filepicker / filepicker-django

A django plugin to make integrating with Filepicker.io even easier
Other
93 stars 29 forks source link

Add FilepickerFile helper and use in middleware #8

Closed jonasvp closed 12 years ago

jonasvp commented 12 years ago

I needed a helper method to download the file from filepicker and figured I'd add it directly here.

I changed the middleware to use it as well because this way the middleware doesn't need to read the whole file in memory. It just downloads to disk and passes the file handler to the Django File object. Might save someone from a DOS attack by uploading a huge file.

Hope it's useful, let me know if you'd rather not merge or need changes.

Jonas

brettcvz commented 12 years ago

I like the use of context-manager, what inspired that? LGTM