1.form标签的enctype必须设置为:enctype="multipart/form-data"
 
2.服务器端:在接受request对象时,file类型的input传来的参数放在request.FILES中。在用于绑定表单时,必须:
form=infoForm(request.POST,request.FILES)
将它传递进去。

相关文章:

  • 2021-09-16
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-10-24
  • 2022-12-23
猜你喜欢
  • 2021-08-01
  • 2022-12-23
  • 2021-12-22
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案