zamis 5 ani în urmă
părinte
comite
34f3fc236a
1 a modificat fișierele cu 5 adăugiri și 3 ștergeri
  1. 5 3
      src/server/service/file-uploader/aws.js

+ 5 - 3
src/server/service/file-uploader/aws.js

@@ -110,9 +110,11 @@ module.exports = function(crowi) {
 
   };
 
-  lib.deleteFiles = 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);
+    });
   };
 
   lib.deleteFileByFilePath = async function(filePath) {