|
@@ -444,16 +444,17 @@ public class AliyunFileStorageImpl implements FileStorage {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void deleteFile(String path) {
|
|
public void deleteFile(String path) {
|
|
- String yunId=FileStorageHelper.getYunId(path);
|
|
|
|
- AliYunAccount ac = AliyunSiteManager.getAliYunAccountByAliyunId(yunId);
|
|
|
|
- String bucket = ac.getBucket();
|
|
|
|
- OSS oss=AliyunSiteManager.getAliYunClientByAliyunId(yunId);
|
|
|
|
- // 阿里云文件路径
|
|
|
|
- String urlpath = FileStorageHelper.getPath(path);
|
|
|
|
- if (urlpath.startsWith("/")) {
|
|
|
|
- urlpath = urlpath.substring(1);
|
|
|
|
- }
|
|
|
|
- oss.deleteObject(bucket, urlpath);
|
|
|
|
|
|
+ //无删除权限
|
|
|
|
+// String yunId=FileStorageHelper.getYunId(path);
|
|
|
|
+// AliYunAccount ac = AliyunSiteManager.getAliYunAccountByAliyunId(yunId);
|
|
|
|
+// String bucket = ac.getBucket();
|
|
|
|
+// OSS oss=AliyunSiteManager.getAliYunClientByAliyunId(yunId);
|
|
|
|
+// // 阿里云文件路径
|
|
|
|
+// String urlpath = FileStorageHelper.getPath(path);
|
|
|
|
+// if (urlpath.startsWith("/")) {
|
|
|
|
+// urlpath = urlpath.substring(1);
|
|
|
|
+// }
|
|
|
|
+// oss.deleteObject(bucket, urlpath);
|
|
|
|
|
|
}
|
|
}
|
|
private String uploadObject(String siteId, FileStoragePathEnvInfo env,InputStream in, String md5) throws IOException {
|
|
private String uploadObject(String siteId, FileStoragePathEnvInfo env,InputStream in, String md5) throws IOException {
|