Commit f0ddcdff authored by hejincai's avatar hejincai

feat: ossUrl过期链接放开到5天

parent 949dee05
...@@ -110,7 +110,7 @@ public class DataReportService { ...@@ -110,7 +110,7 @@ public class DataReportService {
private String generatePresignedUrl(String ossUrl) { private String generatePresignedUrl(String ossUrl) {
// 生成一个带过期时间的url // 生成一个带过期时间的url
String[] ossObjInfo = parseOSSUrl(ossUrl); String[] ossObjInfo = parseOSSUrl(ossUrl);
Instant expireInstant = Instant.now().plusSeconds(86400); Instant expireInstant = Instant.now().plusSeconds(5 * 86400);
URL url = oss.generatePresignedUrl(ossObjInfo[0], ossObjInfo[1], Date.from(expireInstant)); URL url = oss.generatePresignedUrl(ossObjInfo[0], ossObjInfo[1], Date.from(expireInstant));
return url.toString(); return url.toString();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment