开发者

Uploading files **from** Google App Engine

I am trying to upload a file (stored in blobstore and accessed with BlobReader) from my App Engine application to another website.

I have tried urlli开发者_运维技巧b2_file as well as MultipartPostHandler and requests, but they do not work due to GAE module restrictions.

File is sent in a POST request, I'm am aware of the 1MB limit of requests, it's not a concern as the files are below 1MB in size.


I think you would have to build your own multipart form data using the encode_multipart_formdata method from here:

http://code.activestate.com/recipes/146306/

And use that as the body of your urlfetch POST.


I'm going to answer my own question as I believe this is a better solution: use the requests library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜