Commit 609b1115 by 何文超

cos

parent 72d40392
......@@ -48,6 +48,21 @@ public class UploadImgController {
return RestResponse.success(picList);
}
@RequestMapping("get-cos-secret")
@IgnoreLogin
public RestResponse getCosSecret(HttpServletRequest request) throws IOException {
Map<String, String> map = new HashMap<>();
map.put("secretId", "AKIDxpbnsmZ0KYtAKNd5f7QbbP3YyDJD6Rq3");
map.put("secretKey", "GLFwRjpmYviRzLUREqKcieS4VmsmU1Lc");
byte[] bytes = map.get("secretKey").getBytes();
//Base64 加密
String encoded = Base64.getEncoder().encodeToString(bytes);
map.put("secretKey", encoded);
map.put("bucket", "video-1251519181");
map.put("region", "ap-shanghai");
return RestResponse.success(map);
}
@RequestMapping("upload-file")
@IgnoreLogin
public RestResponse uploadFile(HttpServletRequest request) throws IOException {
......
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