doutan2111 2016-10-12 02:10
浏览 196

当使用S3进行身份验证来自服务器端时,如何从android(客户端)调用AWS S3映像URL(php + aws sdk php v3)

I have android as front-end, (php,mysql) as back-end and AWS as the infrastructure host. I am developing APIs using laravel to be consumed by the android app but having problem figuring out how to display images hosted on S3 in android.
I am able to fetch (private)resource URL from S3 using the AWS PHP SDK's getObjectURL method but I can't pass the URL alone as an image src in Android as the URL does not contain credentials and authentication is only happening from server side.
Should I first download images from S3 to my server, cache it and serve to Android or is there a way I can have android directly access the images from the URL i.e. can i append credentials with URL?

  • 写回答

1条回答 默认 最新

  • duandu8202 2016-10-12 02:26
    关注

    You can directly access images from s3 bucket using Andriod SDK see this : https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/s3transferutility.html

    评论

报告相同问题?

问题事件

  • 专家修改了标签 8月18日