Skip to content

provide something like onPartBodyStarted for streaming upload without tmp files #13

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

Open
wingyiu opened this issue Jun 21, 2019 · 4 comments

Comments

@wingyiu
Copy link

wingyiu commented Jun 21, 2019

any possible?

@wingyiu
Copy link
Author

wingyiu commented Jun 21, 2019

like pipeline uploading to aws

@defnull
Copy link

defnull commented Jun 21, 2019

@skinkie
Copy link

skinkie commented May 1, 2020

@defnull while it can be implemented that way, for example the headers are available at the point where the write of the file starts I would see a use case for just having the headers in a more abstract part of the application. Given that the custom PartBodyStreamStorageFactory can be initialised with any context that the application can possible ask for it can't be initialised with values it does not know. For example if I would have two parts one is some identifier and one in the file contents, the parsed contents of part 1 would not be available in part 2. In order to provide such information for the to be uploaded bucket more context should be available in newStreamStorageForPartBody. My own use case would be passing the temporary filename to the rest of the application for monitoring. I am currently setting this filename to something the rest of the application is aware of.

@defnull
Copy link

defnull commented May 2, 2020

I'd just let my NioMultipartParserListener also implement PartBodyStreamStorageFactory, or share the important state between both instances in some other way. Then you'd have all context you could ask for when newStreamStorageForPartBody is called.

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

3 participants