|
|
|
|
|
|
|
|
): |
|
|
): |
|
|
return False |
|
|
return False |
|
|
|
|
|
|
|
|
if config.allowed_file_extensions and file_extension not in config.allowed_file_extensions: |
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
input_file_type == FileType.CUSTOM |
|
|
|
|
|
and config.allowed_file_extensions is not None |
|
|
|
|
|
and file_extension not in config.allowed_file_extensions |
|
|
|
|
|
): |
|
|
return False |
|
|
return False |
|
|
|
|
|
|
|
|
if config.allowed_file_upload_methods and file_transfer_method not in config.allowed_file_upload_methods: |
|
|
if config.allowed_file_upload_methods and file_transfer_method not in config.allowed_file_upload_methods: |