[Answer]-0 Byte uploads to Amazon S3 in Django app

1👍

Based on the behavior you’re describing, I bet the file pointer is at the end because you just explicitly called the storage.save() function. By reading a file twice, you’ll get nothing.

f = StringIO.StringIO('foobar')
f.read() # out 'foobar'
f.read() # out ''
f.seek(0) 
f.read() # out 'foobar'

Leave a comment