当前位置:   article > 正文

java获取s3对象url_AWS S3 Java生成预签名对象URL(自定义生命周期)

java s3 获取预签名url

S3官方JAVA SDK文档

Java代码

public static void signUrl() {

//test

String accessKey = "****************";

String secretKey = "****************";

String region = "****************";

//桶名称

String bucketName = "****************";

//文件地址

String objectKey = "****************";

try {

AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);

ClientConfiguration config = new ClientConfiguration();

String proxyHost = System.getProperty("http.proxyHost");

String proxyPort = System.getProperty("http.proxyPort");

if (proxyHost != null && proxyPort != null) {

config.setProxyHost(proxyHost);

config.setProxyPort(Integer.valueOf(proxyPort));

}

Amazon

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/707115
推荐阅读
相关标签
  

闽ICP备14008679号