Still have not been able to resolve the question:

How to get a BlobInfo with an accurately decoded (unicode) filename
from blobstore.parse_blob_info() after a file upload using
blobstore.create_upload_url()?

>From the 1.5.0 SDK source in blobstore.parse_blob_info(), the filename
of the BlobInfo object created is:
filename = cgi.FieldStorage.disposition_options['filename']

I don't see any attempt to understand the charset/encoding and decode
the filename string. I really doubt that nobody would have reported
this as a bug if it was one, so I must be missing something.

I have posted a broader question around this at
http://stackoverflow.com/questions/6339818/how-are-pythons-cgi-fieldstorage-strings-encoded

Thx for your help. Pascal

On Jun 12, 11:10 pm, pascal <[email protected]> wrote:
> When retrieving a BlobInfo from the datastore using BlobInfo.get(key),
> the filename is a unicode.
>
> However, when uploading a file to the blobstore using
> blobstore.create_upload_url(), and then using
> blobstore.parse_blob_info(), the filename attribute of the returned
> BlobInfo is a python str.
>
> I assume the encoding is specified by the form submission POST
> request; I haven't been able to find the answer in the Python cgi
> module. How can I get this encoding in Python?
>
> Thx in advance.Pascal

-- 
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