Browse Source

modify gcs

zamis 5 years ago
parent
commit
2314600db9
1 changed files with 5 additions and 3 deletions
  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) {