File Upload

21 views
Skip to first unread message

Jason

unread,
Jun 16, 2011, 12:57:17 PM6/16/11
to pylons-...@googlegroups.com
How are file uploads done in Pyramid? 

I have tried to access the file from request.POST['fileupload'] and request.params['fileupload'] using this html form:

<form action="/upload" target="fileupload-frame" method="POST" enctype="multipart/form-data">
<input type="file" id="fileupload" name="fileupload">
</form>

I have tried printing out all the keys in the request, but I cannot find the file anywhere. 

Thanks,

Jason

Jason

unread,
Jun 16, 2011, 1:54:34 PM6/16/11
to pylons-...@googlegroups.com
It was a problem with my form (being submitted by jquery)

Chris McDonough

unread,
Jun 16, 2011, 2:48:12 PM6/16/11
to pylons-...@googlegroups.com
On Thu, 2011-06-16 at 10:54 -0700, Jason wrote:
> It was a problem with my form (being submitted by jquery)

For the record, here's a short tutorial describing file uploads and
Pyramid:

http://docs.pylonsproject.org/projects/pyramid_cookbook/dev/files.html


Reply all
Reply to author
Forward
0 new messages