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

Support Publishers for multipart data in BodyInserters [SPR-16307] #20854

Closed
spring-issuemaster opened this issue Dec 17, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Dec 17, 2017

Marc-Christian Schulze opened SPR-16307 and commented

In order to stream content into a MultipartRequest it would be nice to have support for Publisher, e.g.:

Publisher<ByteBuffer> publisher = ...

WebClient 
    .create(someUrl) 
    .post() 
    .uri(URI.create("/whatever")) 
    .body(BodyInserters.fromMultipartData("file", publisher))
    ...

Issue Links:

  • #20897 Multi-part upload of a byte[] with WebTestClient is Base64 encoded (?) and assigned a JSON content type
  • #20922 Support Custom Headers for Multipart Async Data

Referenced from: commits 283811b, 7035ee7, 6c3a645, f23612c

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 21, 2017

Arjen Poutsma commented

Fixed in 7035ee7

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 22, 2017

Arjen Poutsma commented

Reopening, as storing the ResolvableType in the HttpEntity might not be the best way to implement this.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 22, 2017

Arjen Poutsma commented

Fixed by moving the ResolvableType to a new HttpEntity subtype: 6c3a645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.