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 file function to async_impl::multipart #2106

Merged
merged 10 commits into from
Aug 31, 2024

Conversation

NaokiM03
Copy link
Contributor

@NaokiM03 NaokiM03 commented Jan 23, 2024

Related to #646

Add file function to async_impl::multipart::{Form, Part}.

Notes

Since From<File> for Body was added in #1360, I decided to use the stream function that uses it internally.

This comment says the backend did not support chunked requests, but Transfer-Encoding: chunked should be accepted for HTTP/1.1.

@Feriixu
Copy link

Feriixu commented Aug 27, 2024

@NaokiM03 Are you still developing this? I would very much like this feature merged.

@NaokiM03
Copy link
Contributor Author

@Feriixu

No, this pull request is open, not draft. This means that the implementation I envisioned has already been done and is not under development.

At the time I wanted this feature, but unfortunately I got no response. So I don't even know if this code is correct.
It would be better to ask one of the committers than to tell me.

Copy link
Owner

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to have let this drop! The code looks excellent to me, starting CI, and assuming all is well, I'd be happy to merge.

tests/multipart.rs Outdated Show resolved Hide resolved
@NaokiM03
Copy link
Contributor Author

The test is down and I will try to fix it.
https://github.com/seanmonstar/reqwest/actions/runs/10588215279/job/29476515082?pr=2106

@NaokiM03
Copy link
Contributor Author

@seanmonstar
Could you approve again?

Fixed an error that was occurring in CI. 350733f
Sorry, I ran all the tests again and found that the doc test was failing, so I fixed it. 24b6270

Sorry to have let this drop!

No problem at all. I understand that you are busy and I appreciate your contribution to the Rust ecosystem because I like Rust.

@seanmonstar seanmonstar merged commit cc3dd51 into seanmonstar:master Aug 31, 2024
36 checks passed
kodiakhq bot pushed a commit to pdylanross/fatigue that referenced this pull request Oct 1, 2024
Bumps reqwest from 0.12.7 to 0.12.8.

Release notes
Sourced from reqwest's releases.

v0.12.8
What's Changed

Add support for SOCKS4 proxies.
Add multipart::Form::file() method for adding files easily.
Add Body::wrap() to wrap any http_body::Body type.
Fix the pool configuration to use a timer to remove expired connections.

New Contributors

@​workingjubilee made their first contribution in seanmonstar/reqwest#2402
@​NaokiM03 made their first contribution in seanmonstar/reqwest#2106
@​Xuanwo made their first contribution in seanmonstar/reqwest#2255
@​Jaltaire made their first contribution in seanmonstar/reqwest#2400
@​Hyask made their first contribution in seanmonstar/reqwest#2418
@​Jake-Shadle made their first contribution in seanmonstar/reqwest#2427
@​RobMor made their first contribution in seanmonstar/reqwest#2434

Full Changelog: seanmonstar/reqwest@v0.12.7...v0.12.8



Changelog
Sourced from reqwest's changelog.

v0.12.8

Add support for SOCKS4 proxies.
Add multipart::Form::file() method for adding files easily.
Add Body::wrap() to wrap any http_body::Body type.
Fix the pool configuration to use a timer to remove expired connections.




Commits

95fec09 v0.12.8
baf9712 fix: pass pool_timer to hyper_util to enable the idle cleanup task (#2434)
d85f44b Bump rustls-native-certs (#2427)
c8665be tests: use a documented test network for testing
964b1c6 tests: bypass the proxy when testing timeouts
09884ed feat: Add support for SOCKS4 (#610) (#2400)
a13a6bc ci: pin tokio-util for msrv job (#2412)
4cc8ec8 feat: Expose streaming as public API wrap (#2255)
cc3dd51 Add file function to async::multipart (#2106)
193ed1f chore: Depend on wasm-bindgen 0.2.89 or higher
See full diff in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Nutomic pushed a commit to Nutomic/reqwest that referenced this pull request Nov 7, 2024
* Add file function to async_impl::multipart

* Add test for asynchronous file function in multipart

* Fix doc of file function in blocking::multipart

* Fix test

Follow up on this pull request
seanmonstar#2059

* Fix doc test
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.

3 participants