Browse Source

add comment

itizawa 5 years ago
parent
commit
78248c13bb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/server/service/file-uploader/gcs.js

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

@@ -64,9 +64,11 @@ module.exports = function(crowi) {
     const filePath = getFilePathOnStorage(attachment);
     const filePath = getFilePathOnStorage(attachment);
     const file = myBucket.file(filePath);
     const file = myBucket.file(filePath);
 
 
+    // issue signed url for 30 seconds
+    // https://cloud.google.com/storage/docs/access-control/signed-urls
     return file.getSignedUrl({
     return file.getSignedUrl({
       action: 'read',
       action: 'read',
-      expires: Date.now() + 20 * 60 * 1000,
+      expires: Date.now() + 30 * 1000,
     });
     });
 
 
   };
   };