Get URL(link) of a public S3 object programmatically

后端 未结 7 668
心在旅途
心在旅途 2021-01-01 14:06

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

Till now i h

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 14:32

    s3Client.getUrl(AWS_BUCKET, s3RelativeFilePath).toExternalForm();    
    

    older versions had:

    s3Client.getResourceUrl(bucket, s3RelativeToBucketPath);
    

提交回复
热议问题