Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Flask store uploaded files?

Where does Flask store uploaded files before the application code has a chance to save the file? Unless I've missed something it doesn't appear to be showing up in the /tmp directory, which is what I'd have expected, and obviously it's not showing up in the directory I've specified in app.config['UPLOAD_DIRECTORY']. It's not storing it in memory, is it?

like image 333
Matty Avatar asked Apr 21 '12 20:04

Matty


1 Answers

Did you check the documentation? It seems pretty clear:

So how exactly does Flask handle uploads? Well it will store them in the webserver’s memory if the files are reasonable small otherwise in a temporary location (as returned by tempfile.gettempdir())

like image 103
ig0774 Avatar answered Nov 16 '22 13:11

ig0774