소스 검색

modify aws

zamis 5 년 전
부모
커밋
34f3fc236a
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  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) {