简体   繁体   中英

AWS S3 Android SDK: Get path of uploaded file

I'm following the steps here for uploading a file to AWS S3 http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/s3transferutility.html

Is there any way through the SDK to get the path of the file I just uploaded?

You can obtain the URL by yourself, using the bucket and the file name you used in the upload request.

I mean for example if your bucket is AMAZON_S3_BUCKET and your file is named myfile :

https://s3.amazonaws.com/AMAZON_S3_BUCKET/myfile

or

https://AMAZON_S3_BUCKET.s3.amazonaws.com/myfile

Or if you are using some region like Regions.US_WEST_2 then The URL will be different depending on which region your bucket is in

https://AMAZON_S3_BUCKET.YOUR_BUCKET_REGION.amazonaws.com/myfile

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