[Answer]-Django mutiupload not working

0👍

Maybe it’s not a correct way…

Don’t override save in forms.py and put create each new object in views after valid() like…

def list(request):
    if request.method == 'POST':
        form = MyUploadForm(request.POST, request.FILES)
        if form.is_valid():
            newdoc = form.cleaned_data['docfile']
            for file_obj in request.FILES.getlist('docfile'):
                Document.objects.create(docfile=file_obj)
            return HttpResponseRedirect(reverse('multiupload.views.list'))

1👍

I will suggest you use pl-upload jQuery plugin, I personally use this plugin and this is pretty easy and uploading is very fast.

Here are some of example :

Read a blog here

Code example you look here

Leave a comment