Hey, I don't have a good answer for your exact question. One alternative, though, may be to use nginx, or another httpd, to handle the upload and just have it pass the path along to Django. e.g. http://www.grid.net.ru/nginx/upload.en.html
Good luck! On Sat, Mar 10, 2012 at 11:18 AM, Fedel Bari <fedelb...@googlemail.com>wrote: > Hi! > > I have some troubles uploading large files via ajax and would be very > happy if someone could help. > > I use ajax to upload files to my django app via XHR - not Multipart > Forms. > > When using this technique, django seems to not use the default > FileUpload Handlers, so I do not have something like request.FILES in > my view. Instead there is a request.raw_post_data containing the file > contents. > > Now, as soon as I try to access the file content (access > request.raw_post_data), django loads the whole blob into memory. While > this might be okay to handle small files, I want to be able to upload > large video files. > > I guess the best would be to use the existing django UploadHandler > framework, so small files are automatically loaded into memory and > large files to the disk. Also I would have access to the request.FILES > object. > > However, I was not able to find a way to use django's UploadHandlers > without sending the files via Multipart Form. > > Does anybody know how this can be achieved? > > Thanks in advance / F > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.