zamis пре 5 година
родитељ
комит
896ec75e86
1 измењених фајлова са 5 додато и 3 уклоњено
  1. 5 3
      src/server/service/file-uploader/local.js

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

@@ -30,9 +30,11 @@ module.exports = function(crowi) {
     return true;
   };
 
-  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) {