MultiFileWidget
This is a multi file upload widget. That does not require adding multiple file input fields. It requires jQuery.MultiUpload (http://www.fyneworks.com/jquery/multiple-file-upload/)
- newforms
- upload
- multi-file-upload
- file
This is a multi file upload widget. That does not require adding multiple file input fields. It requires jQuery.MultiUpload (http://www.fyneworks.com/jquery/multiple-file-upload/)
This is a minor modification to [Upload a file using newforms](http://www.djangosnippets.org/snippets/95/) as posted by [mboersma](http://www.djangosnippets.org/snippets/95/). I altered the ZipUploadForm by removing lines 33 - 34: if 'zip_file' in self.clean_data: zip_file = self.clean_data['zip_file'] and adding a return statement to clean_zipfile, which returns the validated zip file. I also added the line: zip_file.clean = clean_zipfile so that when the full_clean() in called on the form, clean_zipfile will automatically run. All other code (the view & template) remain the same. ** Disclaimer ** I'm not *that* familiar with newforms, so please forgive me if some the explanation as to why this works is incorrect ;) Who knows, maybe the first guy had it right.
17 snippets posted so far.