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

feat(upload): Added body to download function #1523

Merged
merged 7 commits into from
Dec 3, 2024

Conversation

enri90
Copy link
Contributor

@enri90 enri90 commented Jul 6, 2024

Added post functionality to the download function
Example

const body = JSON.stringify({ ids: ids });

await download(
  url,
  path,
  ({ progress, total }) => console.log(`Downloaded ${progress} of ${total} bytes`),
  new Map<string, string>([
    ['Content-Type', 'application/json'],
  ]),
  body
);

@enri90 enri90 requested a review from a team as a code owner July 6, 2024 12:53
@FabianLars
Copy link
Member

Sorry for the long delay in your first PR. What do you think about leveraging the native Request object for the url and body?

Basically mirroring the http plugin: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/http/guest-js/index.ts#L104

Let me know what you think and whether you'd be open to work on it (if you agree) or if i should take over :)

@enri90
Copy link
Contributor Author

enri90 commented Jul 9, 2024

Sorry for the long delay in your first PR. What do you think about leveraging the native Request object for the url and body?

Basically mirroring the http plugin: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/http/guest-js/index.ts#L104

Let me know what you think and whether you'd be open to work on it (if you agree) or if i should take over :)

Hi! Thank you for the feedback.
I understand the request to leverage the native Request object for the URL and body and think it's a good idea.
However, I'm not very familiar with Rust and am not sure how to implement this.
If you could take over this part, that would be fantastic.
Thanks!

@FabianLars
Copy link
Member

Okay sure, no problem!

Copy link
Contributor

github-actions bot commented Oct 25, 2024

Package Changes Through d98edb9

There are 2 changes which include upload with patch, upload-js with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
upload 2.2.0 2.2.1
upload-js 2.2.0 2.2.1

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

FabianLars
FabianLars previously approved these changes Dec 3, 2024
@FabianLars
Copy link
Member

i changed my mind, let's keep it simple for now.

@FabianLars FabianLars merged commit 05c62d7 into tauri-apps:v2 Dec 3, 2024
60 checks passed
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