multiple files upload using same input name in django

前端 未结 4 914
北海茫月
北海茫月 2020-11-30 02:45

i m having trouble in uploading multiple files with same input name:





        
4条回答
  •  离开以前
    2020-11-30 03:12

    I dont think all three files will be under the single request.FILES['file'] object. request.FILES['file'] is likely to have either the 1st file or the last file from that list.

    You need to uniquely name the input elements like so:

    
    
    
    

    ..for example.

    EDIT: Justin's answer is better!

提交回复
热议问题