فهرست منبع

fix(file_factory): Remove transfer_method validation (#11207)

Signed-off-by: -LAN- <laipz8200@outlook.com>
-LAN- 4 ماه پیش
والد
کامیت
0554898b5d
2فایلهای تغییر یافته به همراه1 افزوده شده و 4 حذف شده
  1. 0 3
      api/factories/file_factory.py
  2. 1 1
      web/app/components/base/file-uploader/hooks.ts

+ 0 - 3
api/factories/file_factory.py

@@ -244,9 +244,6 @@ def _is_file_valid_with_config(
     ):
         return False
 
-    if config.allowed_file_upload_methods and file_transfer_method not in config.allowed_file_upload_methods:
-        return False
-
     if input_file_type == FileType.IMAGE and config.image_config:
         if config.image_config.transfer_methods and file_transfer_method not in config.image_config.transfer_methods:
             return False

+ 1 - 1
web/app/components/base/file-uploader/hooks.ts

@@ -211,7 +211,7 @@ export const useFile = (fileConfig: FileUpload) => {
       type: '',
       size: 0,
       progress: 0,
-      transferMethod: TransferMethod.remote_url,
+      transferMethod: TransferMethod.local_file,
       supportFileType: '',
       url,
       isRemote: true,