Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Add File Download Capability to SendHttpRequest Activity #5601

Closed
sfmskywalker opened this issue Jun 13, 2024 · 1 comment
Closed

[ENH] Add File Download Capability to SendHttpRequest Activity #5601

sfmskywalker opened this issue Jun 13, 2024 · 1 comment
Assignees
Labels
elsa 3 This issue is specific to Elsa 3 enhancement New feature or request
Milestone

Comments

@sfmskywalker
Copy link
Member

Current Behavior

The SendHttpRequest activity in Elsa Workflows currently supports handling responses with content types such as JSON, text, XML, HTML, etc.

Enhancement Proposal

To expand the functionality of the SendHttpRequest activity, we propose adding a content parser that can handle file downloads from a provided URL. This parser should process the returned file from the response and provide it as output of the activity.

Acceptance Criteria

  1. Content Parser Implementation: Develop a content parser capable of detecting and processing file responses.
  2. File Output Handling: Ensure the downloaded file is provided as output of the SendHttpRequest activity.

This enhancement will allow users to seamlessly integrate file downloading capabilities into their workflows, broadening the scope and utility of the SendHttpRequest activity.

@sfmskywalker sfmskywalker added enhancement New feature or request elsa 3 This issue is specific to Elsa 3 labels Jun 13, 2024
@sfmskywalker sfmskywalker added this to the Elsa 3.2 milestone Jun 13, 2024
@sfmskywalker sfmskywalker self-assigned this Jun 13, 2024
Copy link

glime-ai bot commented Jun 13, 2024

To implement the proposed enhancement for the SendHttpRequest activity in Elsa Workflows, you would need to follow these steps:

  1. Extend the Activity: Create a new activity or extend the existing SendHttpRequest activity to include a content parser that can handle file downloads.

  2. Detect Content Type: Implement logic to detect the content type of the response. If the content type indicates a file (e.g., application/octet-stream, application/pdf, etc.), proceed with handling the file download.

  3. Process File Response: Develop the content parser to handle the file response. This may involve creating a temporary file on the server or streaming the content directly to a byte array.

  4. Provide File Output: Modify the activity's output to include the downloaded file. This could be the path to the temporary file, a byte array, or a stream.

  5. Update Documentation: Update the activity's documentation to reflect the new file handling capabilities and provide examples of how to use the new feature.

  6. Test the Enhancement: Thoroughly test the new functionality to ensure it handles various file types and content disposition scenarios correctly.

  7. Submit for Review: Once the enhancement is implemented and tested, submit it for review and integration into the Elsa Workflows project.

Please note that this is a high-level overview, and actual implementation details may vary based on the Elsa Workflows architecture and coding standards.

This comment was generated by Glime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elsa 3 This issue is specific to Elsa 3 enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant