| | |
| | | import javax.crypto.SecretKey; |
| | | import java.io.File; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | |
| | | if (!normalizedActionPath.endsWith("/")) { |
| | | normalizedActionPath = normalizedActionPath + "/"; |
| | | } |
| | | String baseUrl = domain + prefix + normalizedActionPath + storageBlob.getUidFilename(); |
| | | String baseUrl = domain + prefix + normalizedActionPath + URLEncoder.encode(storageBlob.getUidFilename(), StandardCharsets.UTF_8).replace("+", "%20"); |
| | | |
| | | // -1 表示永久有效,不生成 token,改为 publicKey 组合校验 |
| | | if (expired != null && BigDecimal.valueOf(-1L).compareTo(expired) == 0) { |