zamis 5 лет назад
Родитель
Сommit
4854fcabf3
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      src/server/service/file-uploader/aws.js

+ 6 - 2
src/server/service/file-uploader/aws.js

@@ -110,10 +110,14 @@ module.exports = function(crowi) {
 
   };
 
+  lib.deleteFile = async function(attachment) {
+    const filePath = getFilePathOnStorage(attachment);
+    return lib.deleteFileByFilePath(filePath);
+  };
+
   lib.deleteFiles = async function(attachments) {
     attachments.map((attachment) => {
-      const filePath = getFilePathOnStorage(attachment);
-      return lib.deleteFileByFilePath(filePath);
+      return lib.deleteFile(attachment);
     });
   };