我在上传具有相同输入名称的多个文件时遇到问题:
<input type=file name="file">
<input type=file name="file">
<input type=file name="file">
Run Code Online (Sandbox Code Playgroud)
在django一边
print request.FILES :
<MultiValueDict: {u'file': [
<TemporaryUploadedFile: captcha_bg.jpg (image/jpeg)>,
<TemporaryUploadedFile: 001_using_git_with_django.mov (video/quicktime)>,
<TemporaryUploadedFile: ejabberd-ust.odt (application/vnd.oasis.opendocument.text)>
]}>
Run Code Online (Sandbox Code Playgroud)
所以这三个文件都在单个request.FILES ['file']对象下.我如何处理从这里上传的每个文件?