tags:

views:

89

answers:

3

Hi!

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?

A: 

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

nosklo
A: 
uploaded_file = request.params['fieldname']
if uploaded_file:
    print uploaded_file.filename
Marius Gedminas
A: 

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

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