Read uploaded file into string using Django

Have you looked into "Chunking" your uploads. What this basically does, is break your upload into multiple "chunks" as it saves it to the disk. I think this will help you upload larger files.

Regarding the empty file after "data = file.read()" executes, I think you can do something like file.seek(0) to bring the file pointer back to the beginning of the file. I'm guessing that the first read of the file is leaving the file pointer at the end of the file so it looks empty.

Hope this helps, Joe

Tags:

Django