我尝试上传文件,我怎么能检查,如果文件被上传Cheking添加文件来上传python,pylons?
当我发送空输入巫婆文件上传我得到
AttributeError: 'unicode' object has no attribute 'filename'
如何检查添加的文件?
我尝试上传文件,我怎么能检查,如果文件被上传Cheking添加文件来上传python,pylons?
当我发送空输入巫婆文件上传我得到
AttributeError: 'unicode' object has no attribute 'filename'
如何检查添加的文件?
我不明白这个问题,但here你有完整的例子来说明如何处理挂在pylons上的文件。
uploaded_file = request.params['fieldname'] if uploaded_file: print uploaded_file.filename
一定要设置多= True和省略方法= “POST”
${h.form(c.formUrl, multipart=True)}