How to use valum's file uploader in conjunction with Amazon S3 storage?
I have a file upload form where the file gets uploaded to an S3 bucket at Amazon. I am using https://bitbucket.org/david/django-storages/wiki/Home for that purpose.
Basic file uploading works fine and does it's job but now I would like to integrate an Ajax file uploader into the form and I settled with "valum's file-uploader", using the following fork: https://github.com/alexkuhl/file-uploader
I also stumbled across the following blogpost detailing how to save a file with that backend: http://kuhlit.blogspot.com/2011/04/ajax-file-uploads-and-csrf-in-django-13.html
My experience with ajax file uploads is limited (I used SWFUpload once but I'd prefer a flashless solution this time around) and from the looks of the blogpost the file gets saved on the servers file system. What I would like to do is integrate the upload script with the s3 backend provided by django-storages. Ideally, no开发者_JAVA百科 byte from the file gets saved on the webserver but passed through to s3.
Any pointers to built in Django functions, blog posts, general ideas are welcome. Moreover, if anyone has a suggestion for another upload script where I can achieve my goal more easily, feel free to suggest it.
I made it work by configuring the uploader to use the hidden iframe method. Now it works together nicely with django's backend. However, I am missing some convience features like drag&drop now.
精彩评论