upload multiple files in django

前端 未结 4 1939
忘了有多久
忘了有多久 2020-12-18 09:33

I am new to django, I am trying to upload more than one file from the browser and store them somewhere in computer storage but I am not storing them successfully with this c

4条回答
  •  -上瘾入骨i
    2020-12-18 10:23

    Answer from official django documentation

    file_field = forms.FileField(widget=forms.ClearableFileInput(attrs={'multiple': True}))

    https://docs.djangoproject.com/en/3.0/topics/http/file-uploads/#uploading-multiple-files

提交回复
热议问题