Skip to content

Commit 0554898

Browse files
authored
fix(file_factory): Remove transfer_method validation (#11207)
Signed-off-by: -LAN- <[email protected]>
1 parent 6f9ce6a commit 0554898

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

api/factories/file_factory.py

-3
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,6 @@ def _is_file_valid_with_config(
244244
):
245245
return False
246246

247-
if config.allowed_file_upload_methods and file_transfer_method not in config.allowed_file_upload_methods:
248-
return False
249-
250247
if input_file_type == FileType.IMAGE and config.image_config:
251248
if config.image_config.transfer_methods and file_transfer_method not in config.image_config.transfer_methods:
252249
return False

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export const useFile = (fileConfig: FileUpload) => {
211211
type: '',
212212
size: 0,
213213
progress: 0,
214-
transferMethod: TransferMethod.remote_url,
214+
transferMethod: TransferMethod.local_file,
215215
supportFileType: '',
216216
url,
217217
isRemote: true,

0 commit comments

Comments
 (0)