0

I try to upload file, how can i check if file is upload

when i send empty input witch file upload i get

AttributeError: 'unicode' object has no attribute 'filename'

How can i check added file?

3 Answers 3

1

be sure to set multipart=True and to omit method="POST"

${h.form(c.formUrl, multipart=True)}
0

I don't understand the question, but here you have full examples on how to handle file upload on pylons.

0
uploaded_file = request.params['fieldname']
if uploaded_file:
    print uploaded_file.filename

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.