fix: Qiniu 上传令牌改为 key 作用域,支持覆盖已有文件
This commit is contained in:
@@ -65,7 +65,7 @@ public class QiniuStorageService implements StorageService {
|
|||||||
public void store(String path, String content) {
|
public void store(String path, String content) {
|
||||||
ensureInit();
|
ensureInit();
|
||||||
try {
|
try {
|
||||||
uploadManager.put(content.getBytes(), path, auth.uploadToken(bucket));
|
uploadManager.put(content.getBytes(), path, auth.uploadToken(bucket, path));
|
||||||
log.debug("Qiniu 上传: {}", path);
|
log.debug("Qiniu 上传: {}", path);
|
||||||
} catch (QiniuException e) {
|
} catch (QiniuException e) {
|
||||||
String detail = e.response != null ? "code=" + e.response.statusCode + " " + e.response.error : e.getMessage();
|
String detail = e.response != null ? "code=" + e.response.statusCode + " " + e.response.error : e.getMessage();
|
||||||
|
|||||||
Reference in New Issue
Block a user