|
|
@ -1,7 +1,9 @@ |
|
|
|
package com.fr.plugin.file.submit.oss.fun; |
|
|
|
package com.fr.plugin.file.submit.oss.fun; |
|
|
|
|
|
|
|
|
|
|
|
import com.aliyun.oss.HttpMethod; |
|
|
|
import com.aliyun.oss.HttpMethod; |
|
|
|
|
|
|
|
import com.aliyun.oss.OSS; |
|
|
|
import com.aliyun.oss.OSSClient; |
|
|
|
import com.aliyun.oss.OSSClient; |
|
|
|
|
|
|
|
import com.aliyun.oss.OSSClientBuilder; |
|
|
|
import com.aliyun.oss.model.GeneratePresignedUrlRequest; |
|
|
|
import com.aliyun.oss.model.GeneratePresignedUrlRequest; |
|
|
|
import com.fanruan.api.net.NetworkKit; |
|
|
|
import com.fanruan.api.net.NetworkKit; |
|
|
|
import com.fr.decision.fun.impl.BaseHttpHandler; |
|
|
|
import com.fr.decision.fun.impl.BaseHttpHandler; |
|
|
@ -46,7 +48,7 @@ public class OssDownloadHttpHandler extends BaseHttpHandler { |
|
|
|
|
|
|
|
|
|
|
|
private String createDownloadUrl(String bucket, String directory, String fileName) throws Exception { |
|
|
|
private String createDownloadUrl(String bucket, String directory, String fileName) throws Exception { |
|
|
|
// 创建OSSClient实例。
|
|
|
|
// 创建OSSClient实例。
|
|
|
|
OSSClient ossClient = new OSSClient( |
|
|
|
OSS ossClient = new OSSClientBuilder().build( |
|
|
|
OssUniversalConfig.getInstance().getEndPoint(), |
|
|
|
OssUniversalConfig.getInstance().getEndPoint(), |
|
|
|
OssUniversalConfig.getInstance().getAccessKeyId(), |
|
|
|
OssUniversalConfig.getInstance().getAccessKeyId(), |
|
|
|
OssUniversalConfig.getInstance().getRealAccessKeySecret()); |
|
|
|
OssUniversalConfig.getInstance().getRealAccessKeySecret()); |
|
|
|