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

1.form标签的enctype必须设置为:enctype="multipart/form-data"
 
2.服务器端:在接受request对象时,file类型的input传来的参数放在request.FILES中。在用于绑定表单时,必须:
form=infoForm(request.POST,request.FILES)
将它传递进去。
posted @ 2012-03-22 13:49  jianhong  阅读(165)  评论(0)    收藏  举报