http://blog.notdot.net/2009/9/Handling-file-uploads-in-App-Engine

-Nick

On Tue, Jun 14, 2011 at 9:33 PM, Tim <[email protected]> wrote:

>
> On the topic of file uploads (if you'll pardon slight hijacking of the
> thread), when using the provided webapp framework, I couldn't find a way to
> get hold of the type and filename parameters from a file submitted as part
> of a multipart form request, so had to resort to a "plain CGI" handler
>
> def main():
>     form = cgi.FieldStorage()
>     if "uploadedfile" in form:
>         i = form["imagefile"]
>         filename = i.filename
>         filetype     = i.type
>         filecontents  = i.value
>
> No great hardship (and I expect these extra values can't always be trusted
> - I only use them as part of reporting back to the user what's been done),
> but does anyone know how to get these values using webapp, or do I have to
> leave this page as it stands?
>
> --
> T
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/o9xygy8wvA8J.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
Nick Johnson, Developer Programs Engineer, App Engine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to