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

What is the best practice to consume MULTIPART_FORM_DATA #131

Open
sutra opened this issue Jan 21, 2021 · 3 comments
Open

What is the best practice to consume MULTIPART_FORM_DATA #131

sutra opened this issue Jan 21, 2021 · 3 comments

Comments

@sutra
Copy link
Contributor

sutra commented Jan 21, 2021

Like this:

@POST
@Path("/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
void updateFile(File file) throws IOException;
java.lang.IllegalArgumentException: Unsupported media type: multipart/form-data
	at si.mazi.rescu.RequestWriterResolver.resolveWriter(RequestWriterResolver.java:57)

See https://github.com/go-resty/resty#multipart-files-upload as well.

@mmazi
Copy link
Owner

mmazi commented Jan 26, 2021

rescu doesn't currently support accessing multipart/form-data services and there is no such support planned.

If you wish to implement this in rescu, we can discuss how to best do this.

@sutra
Copy link
Contributor Author

sutra commented Jan 26, 2021

Maybe expose the RequestWriterResolver to let user add their own RequestWriter.

@mmazi
Copy link
Owner

mmazi commented Jan 27, 2021

Seems doable. If you submit a pull request, I'll be happy to review it.

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

No branches or pull requests

2 participants