question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MultipartParser: option to write files to temporary directory on file upload

See original GitHub issue

Would you consider enhancing formparsers.MultipartParser to allow the option to write to a temporary file instead using SpooledTemporaryFile? Maybe allow the user to specify the temporary file type?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
tomchristiecommented, Feb 18, 2019

So, I guess this won’t be resolved until we have a generic answer to “configurable parsers”. In the meantime I guess you may want to deal with this explicitly - subclass MultipartParser, and use files = MyParser().parse(request.stream) or something.

1reaction
simonwcommented, Nov 25, 2019

Here’s a suggestion for a way to make it much easier to subclass this behaviour: https://github.com/simonw/starlette/commit/d53f89d39b4d6451d82e679fffbe0bea342296fc

Does that feel like a good solution? I’m not sure if that’s a clean pattern or not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How does one specify a temp directory for file uploads in ...
I'm using Spring Boot and need to let users upload files for processing. Right now, the file uploads ...
Read more >
File Upload - Confluence Mobile - Apache Software Foundation
Support for individual and multiple file uploads are provided. When a file is uploaded it will typically be stored in a temporary directory....
Read more >
Locking files while uploading / Upload to temporary file name
This is easy solution, but won't work in multi-user environment. Upload data files to temporary (“upload”) folder and move them atomically to ...
Read more >
FileField uploads accumulating in FILE_UPLOAD_TEMP_DIR
When uploading a files >2.5MB via a regular Django view or the Django Admin, the file uploads and the temp copy in /tmp...
Read more >
File upload temporary directory - Page 2 — oracle-tech
I didn't realize that this setting is the memory threshold before files are temporarily stored in UPLOAD_TEMP_DIR (now I know what you were ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found