소스 검색

[local importer] limiting the file size to 1MB (#2909)

Ayush Goyal 3 년 전
부모
커밋
91062b8300
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      desktop/libs/indexer/src/indexer/templates/importer.mako

+ 2 - 2
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -3234,8 +3234,8 @@ ${ commonheader(_("Importer"), "indexer", user, request, "60px") | n,unicode }
         var files = $('#inputfile')[0].files[0];
         fd.append('file', files);
         var file_size = files.size;
-        if (file_size > 10485760) {
-          $.jHueNotify.warn("${ _('File size exceeds the supported size (10 MB). Please use the S3, ABFS or HDFS browser to upload files.') }");
+        if (file_size > 1 * 1024 * 1024) {          
+          $.jHueNotify.warn("${ _('File size exceeds the supported size (1 MB). Please use the S3, ABFS or HDFS browser to upload files.') }");
         } else {
           $.ajax({
             url:"/indexer/api/indexer/upload_local_file",