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

added Flask example #22

Merged
merged 3 commits into from
Oct 13, 2018
Merged

added Flask example #22

merged 3 commits into from
Oct 13, 2018

Conversation

patrislav1
Copy link

streaming-form-data is very useful for Flask, since Flask's default form data parser (werkzeug.formparser) is very CPU intensive.
By integrating streaming-form-data, file uploads to my web app speed up by more than factor 10!

The only issue is that it can't seem to determine the original file name (but that isn't crucial to my particular application).

@siddhantgoel
Copy link
Owner

@patrislav1 Thanks for the PR, and super happy that it's working well for you!

The original filename should be available in the targets (file variable in your example) under the multipart_filename attribute. If it's not there, please open an issue so we could look into it.

I'll try to merge this PR this weekend.

@patrislav1
Copy link
Author

The original filename should be available in the targets (file variable in your example) under the multipart_filename attribute. If it's not there, please open an issue so we could look into it.

Yes, that worked. I added it to the example code in this PR.

@siddhantgoel siddhantgoel merged commit ebe3ec6 into siddhantgoel:master Oct 13, 2018
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.

2 participants