|
|
|
@ -4,7 +4,6 @@ import com.aliyun.oss.HttpMethod;
|
|
|
|
|
import com.aliyun.oss.OSSClient; |
|
|
|
|
import com.aliyun.oss.model.GeneratePresignedUrlRequest; |
|
|
|
|
import com.fr.data.NetworkHelper; |
|
|
|
|
import com.fr.decision.fun.HttpHandler; |
|
|
|
|
import com.fr.decision.fun.impl.BaseHttpHandler; |
|
|
|
|
import com.fr.plugin.file.submit.oss.conf.FileSubmitOssServerConfig; |
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
@ -55,7 +54,8 @@ public class OssDownloadHttpHandler extends BaseHttpHandler {
|
|
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
|
calendar.add(Calendar.MINUTE, 1); |
|
|
|
|
Date expiration = calendar.getTime(); |
|
|
|
|
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, StableUtils.pathJoin(directory, fileName), HttpMethod.GET); |
|
|
|
|
String key = StableUtils.pathJoin(directory, fileName); |
|
|
|
|
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, key, HttpMethod.GET); |
|
|
|
|
// 设置过期时间。
|
|
|
|
|
request.setExpiration(expiration); |
|
|
|
|
// 生成签名URL(HTTP GET请求)。
|
|
|
|
|