以编程方式获取公共S3对象的URL(链接) [英] Get URL(link) of a public S3 object programmatically
本文介绍了以编程方式获取公共S3对象的URL(链接)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用服务器中的给定Java API在AWS S3存储桶中存储一个公共对象 现在,我需要将S3对象的公共URL返回给我的客户端
I am storing one public object in AWS S3 bucket using given java API in my server Now i need to return back the public URL of the S3 object to my client
到目前为止,我还没有找到任何可以返回S3对象的公共URL(或链接字段)的API调用
Till now i have'nt found any API call that can return the public URL(or link field) of a S3 object
有没有办法获取URL?
Is there any way to get the URL??
推荐答案
s3Client.getUrl(AWS_BUCKET, s3RelativeFilePath).toExternalForm();
旧版本具有:
s3Client.getResourceUrl(bucket, s3RelativeToBucketPath);
这篇关于以编程方式获取公共S3对象的URL(链接)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文