简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM