zamis 5 anos atrás
pai
commit
2314600db9
1 arquivos alterados com 5 adições e 3 exclusões
  1. 5 3
      src/server/service/file-uploader/gcs.js

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

@@ -87,9 +87,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) {