0

I'm developing a custom Django project and I'm stuck in a simple task:

  • Upload multiple files in Django

I'd like to use any of these JQuery/AJAX libraries:

I'm used to upload images in Django 1 by 1 using Django Forms. I create a forms.FileField in my form and I don't have any problems managing the file.

I've been reading about formsets because I thought that could fit my needs here but I feel I don't understand them very well

My doubts are beause with JQuery File Upload you can select multiple files to upload, and it's possible to start uploads files individually. You can select 7 files to upload and start uploading only the 3rd file...

  • It's possible to manage this kind of uploading via Django ?
  • Wich is the most secure and painless way to do/manage this ?

I'm interested in the option of uploading multiple files, with option of managing them individually (or not) depending on the user like JQuery File Upload

I've already checked this stackoverflow questions:

Thanks

Community
  • 1
  • 1
AlvaroAV
  • 10,335
  • 12
  • 60
  • 91
  • 1
    You can integrate `JQuery File Upload` with `inlineformset_factory`. Simply send AJAX to your CreateView and handle formset like a form (doesn't care how many forms you send) – madzohan Oct 28 '14 at 11:51
  • I'm goint to try your suggestion today! Thanks for the info – AlvaroAV Oct 28 '14 at 12:05
  • Maybe I will write guide about this in a month, because faced the same problems in the current project – madzohan Oct 28 '14 at 12:19

0 Answers0