image processing - Validation Error with Multiple File Uploads in Django via Ajax -


i have view trying submit multiple ajax uploads via raw post data (e.g. via octet-stream). these requests submitted 1 after other process in parallel. problem django thinks last request valid. example, if submit 5 files, first 4 give:

upload valid image. file uploaded either not image or corrupted image.

i'm guessing occurs because somehow requests overlap? , image isn't loaded before form attempts validate it?

and last 1 works fine.

my upload view:

  def upload(request):     form = uploadimageform(request.post, request.files)     print form     if form.is_valid():       # ..process image.. 

and upload image form:

class uploadimageform(forms.form):     upload  = forms.imagefield() 

to submit requests i'm using html5uploader js pretty right out of box.

on different not, have tried https://github.com/blueimp/jquery-file-upload/ - pretty non-flash based file uploader progress bar.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -