소스 검색

add getIsUploadable

zamis 5 년 전
부모
커밋
1186c192b7
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/server/service/file-uploader/aws.js

+ 4 - 0
src/server/service/file-uploader/aws.js

@@ -116,6 +116,10 @@ module.exports = function(crowi) {
   };
 
   lib.deleteFiles = async function(attachments) {
+    if (!this.getIsUploadable()) {
+      throw new Error('AWS is not configured.');
+    }
+
     const s3 = S3Factory();
     const awsConfig = getAwsConfig();