Django : Read multiple file from html form -
i trying upload multiple files using django. using following code select multiple files in html form. index.html
image files:<input type="file" name="image" multiple /><br/>
views.py
image=request.files.get('image')
models.py
image=models.imagefield(upload_to=get_upload_pathimage)
now last file (if select 3 files 3rd file). how images ?
request.files
multivaluedict
, doing get
return last value noted. if want of values should use images = request.files.getlist('image')
.
Comments
Post a Comment