制作上传图片及文件时须知

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