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: add multipart file upload streaming #309 #879

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

jeevatkm
Copy link
Member

@jeevatkm jeevatkm commented Oct 4, 2024

This PR adds the long-awaited feature of multipart file upload streaming in Resty. There are two behavior -

  • If any file or io. Reader is detected in the MultipartField; Resty, by default, will stream the content in the request body
  • Otherwise, Resty will do simple multipart form data gets composed in memory to fire the request

This PR opens the way for the next feature, i.e., multipart live upload progress callback.

closes #309
closes #495
closes #576
closes #650

@jeevatkm jeevatkm added feature v3 For resty v3 labels Oct 4, 2024
@jeevatkm jeevatkm added this to the v3.0.0 Milestone milestone Oct 4, 2024
@jeevatkm jeevatkm self-assigned this Oct 4, 2024
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 90.26549% with 11 lines in your changes missing coverage. Please review.

Project coverage is 98.35%. Comparing base (c6cf259) to head (2e127ca).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
middleware.go 81.25% 4 Missing and 5 partials ⚠️
request.go 92.59% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #879      +/-   ##
==========================================
+ Coverage   98.15%   98.35%   +0.20%     
==========================================
  Files          14       15       +1     
  Lines        2329     2431     +102     
==========================================
+ Hits         2286     2391     +105     
+ Misses         23       21       -2     
+ Partials       20       19       -1     
Flag Coverage Δ
unittests 98.35% <90.26%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jeevatkm jeevatkm merged commit 0d0bc1b into main Oct 4, 2024
5 of 6 checks passed
@jeevatkm jeevatkm deleted the multipart-upload-streaming branch October 4, 2024 04:21
major0 added a commit to major0/go-proton-api that referenced this pull request Jan 16, 2025
reverts 17c9b5b

Stop using a custom version of go-resty. The original reason for forking
resty has since been fixed.

See:
- go-resty/resty#334
- go-resty/resty#879
major0 added a commit to major0/go-proton-api that referenced this pull request Jan 16, 2025
Stop using a custom version of go-resty. The original reason for forking
resty has since been fixed.

See:
- go-resty/resty#334
- go-resty/resty#879
major0 added a commit to major0/go-proton-api that referenced this pull request Jan 16, 2025
Stop using a custom version of go-resty. The original reason for forking
resty has since been fixed.

See:
- go-resty/resty#334
- go-resty/resty#879
major0 added a commit to major0/go-proton-api that referenced this pull request Jan 16, 2025
Stop using a custom version of go-resty. The original reason for forking
resty has since been fixed.

See:
- go-resty/resty#334
- go-resty/resty#879
major0 added a commit to major0/go-proton-api that referenced this pull request Jan 27, 2025
Stop using a custom version of go-resty. The original reason for forking
resty has since been fixed.

See:
- go-resty/resty#334
- go-resty/resty#879
major0 added a commit to major0/go-proton-api that referenced this pull request Jan 27, 2025
reverts 17c9b5b

Stop using a custom version of go-resty. The original reason for forking
resty has since been fixed.

See:
- go-resty/resty#334
- go-resty/resty#879
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature v3 For resty v3
Development

Successfully merging this pull request may close these issues.

1 participant