Skip to content

Add support multipart request parts in @RequestBean #11722

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

Draft
wants to merge 1 commit into
base: 4.9.x
Choose a base branch
from

Conversation

altro3
Copy link
Contributor

@altro3 altro3 commented Apr 7, 2025

Fixed #11682

@altro3
Copy link
Contributor Author

altro3 commented Apr 7, 2025

@graemerocher @dstepanov @yawkat Could you help with this feature?

This change is just the first step to be able to put the Part annotation at the field level in the RequestBean class. But how to add correct processing is not yet clear. Multipart request processing is implemented differently... It is hard for me to figure out where and what needs to be fixed to add this feature

@yawkat
Copy link
Member

yawkat commented Apr 7, 2025

unfortunately as you say multipart is handled specially depending on server implementation, and is pretty complicated. this feature will probably have to wait for a unified multipart api

@altro3
Copy link
Contributor Author

altro3 commented Apr 7, 2025

Any plans to do it? Ithink this is important to people, who want to migrate from spring to micronaut. Currently I foun only this feature thats not supported by micronaut, but supported by spring boot

@dstepanov
Copy link
Contributor

@altro3 The parts are loaded async. Check NettyPartUploadAnnotationBinder and see that it returns PendingRequestBindingResult which will return Optional.empty if it's not yet resolved.
To implement this case you would need to convert the bind method of RequestBeanAnnotationBinder to return PendingRequestBindingResult with proper check for all the arguments isPending.

@yawkat
Copy link
Member

yawkat commented Apr 7, 2025

@altro3 multipart improvements are WIP but it's a bit stuck in review on the netty side atm. netty-contrib/codec-multipart#25

maybe that situation will improve now that netty 4.2 is out.

@altro3
Copy link
Contributor Author

altro3 commented Apr 7, 2025

oh, understand...

@yawkat Unfortunately the project looks dead... :-(

@yawkat
Copy link
Member

yawkat commented Apr 7, 2025

It's not exactly dead, but there's just not very many people that are knowledgeable enough about netty and multipart to do such a big review. I've definitely not given up on it, it is a medium term priority for me.

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.

Add support multipart request parts in RequestBean
3 participants