utsushiiro пре 7 година
родитељ
комит
6b25a2d9fd

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

@@ -109,7 +109,10 @@ module.exports = function(crowi) {
   };
   };
 
 
   /**
   /**
-   * chech storage for fileUpload reaches MONGO_GRIDFS_TOTAL_LIMIT (for gridfs)
+   * check the file size limit
+   *
+   * In detail, the followings are checked.
+   * - per-file size limit (specified by MAX_FILE_SIZE)
    */
    */
   lib.checkLimit = async(uploadFileSize) => {
   lib.checkLimit = async(uploadFileSize) => {
     const maxFileSize = crowi.configManager.getConfig('crowi', 'app:maxFileSize');
     const maxFileSize = crowi.configManager.getConfig('crowi', 'app:maxFileSize');

+ 5 - 1
src/server/service/file-uploader/gridfs.js

@@ -50,7 +50,11 @@ module.exports = function(crowi) {
   };
   };
 
 
   /**
   /**
-   * chech storage for fileUpload reaches MONGO_GRIDFS_TOTAL_LIMIT (for gridfs)
+   * check the file size limit
+   *
+   * In detail, the followings are checked.
+   * - per-file size limit (specified by MAX_FILE_SIZE)
+   * - mongodb(gridfs) size limit (specified by MONGO_GRIDFS_TOTAL_LIMIT)
    */
    */
   lib.checkLimit = async(uploadFileSize) => {
   lib.checkLimit = async(uploadFileSize) => {
     const maxFileSize = crowi.configManager.getConfig('crowi', 'app:maxFileSize');
     const maxFileSize = crowi.configManager.getConfig('crowi', 'app:maxFileSize');

+ 4 - 1
src/server/service/file-uploader/local.js

@@ -68,7 +68,10 @@ module.exports = function(crowi) {
   };
   };
 
 
   /**
   /**
-   * chech storage for fileUpload reaches MONGO_GRIDFS_TOTAL_LIMIT (for gridfs)
+   * check the file size limit
+   *
+   * In detail, the followings are checked.
+   * - per-file size limit (specified by MAX_FILE_SIZE)
    */
    */
   lib.checkLimit = async(uploadFileSize) => {
   lib.checkLimit = async(uploadFileSize) => {
     const maxFileSize = crowi.configManager.getConfig('crowi', 'app:maxFileSize');
     const maxFileSize = crowi.configManager.getConfig('crowi', 'app:maxFileSize');