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

Add HTTP file download activity and supporting classes #5608

Merged
merged 5 commits into from
Jun 15, 2024

Conversation

sfmskywalker
Copy link
Member

@sfmskywalker sfmskywalker commented Jun 13, 2024

This commit adds a new activity, DownloadHttpFile, which provides the capability to download a file from a specified URL. It introduces supporting classes like HttpFile, FileHttpContentParser, and several extensions methods related to handling HTTP headers and file content. It also contains necessary updates in existing classes to accommodate the new file-download feature.

Closes #5601


This change is Reviewable

This commit adds a new activity, DownloadHttpFile, which provides the capability to download a file from a specified URL. It introduces supporting classes like HttpFile, FileHttpContentParser, and several extensions methods related to handling HTTP headers and file content. It also contains necessary updates in existing classes to accommodate the new file-download feature.
@sfmskywalker sfmskywalker requested review from a team June 13, 2024 20:26
In DownloadHttpFile.cs, context data now includes response content's file stream. Changes to DefaultDownloadableManager.cs simplify the return statement when no provider is found, directly returning an empty array.
A new ByteArrayConverter class has been added to Elsa.JavaScript that converts byte arrays to Uint8Arrays. In Elsa.Http, the DownloadHttpFile activity now also stores the downloaded file's content in bytes. In addition, various new type aliases have been added to the Elsa.Http and Elsa.JavaScript modules, making it easier to handle non-string responses and the transfer of data.
The package versions for Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm have been updated from 3.2.0-preview.346 to 3.2.0
@sfmskywalker
Copy link
Member Author

Waiting for sebastienros/jint#1890 before merging this.

Updated the Jint package version to 4.0.0-preview-644. Also, added the Jint Preview package source in the NuGet configuration. Furthermore, made a change to use ArrayBuffer instead of Uint8Array in ByteArrayConverter.cs to align with the updated Jint version.
@sfmskywalker sfmskywalker merged commit ae66015 into patch/3.2.x Jun 15, 2024
1 of 2 checks passed
@sfmskywalker sfmskywalker deleted the enh/5601 branch June 15, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants