开发者

Upload files from GAE to S3 directly

I am creating XML files in my GAE web application and I would like to host them somewhere. The link has to be consistent HOST_URL + filename. So Amazon S3 looks like it would work - I can upload a file and the URL is pointing directly to the file. Now my question is - how can I upload files from 开发者_运维百科GAE to S3? The Amazon SDK does not work on GAE. What is the upload limit from GAE? Is it 1MB or 32MB? Can you provide maybe a sample HTTP request for uploading data directly to S3?

Would be using the Blobstore API easier? What is the file-size limit for uploading a file that is created in GAE and need to uploaded to Blobstore API directly?

Thanks.


As you have noticed already S3 api's don't work well with GAE. For storing files on GAE you can use either BigTable, Blobstore or google storage so pick the option which best suits your needs. There is a nice article describing them all with code samples here

You can save a filename and the blob location in a bigtable. Once you have your data stored on GAE you can create a special servlet which would take the file name, find the correspoding data informatio in bigtable, retrive it from blobstore for example and return it to the user (just an idea).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜