mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix gpt 4v upload image issue (#1799)
Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
parent
7c5661152e
commit
022450768f
|
@ -30,9 +30,11 @@ class FileService:
|
|||
etl_type = current_app.config['ETL_TYPE']
|
||||
if etl_type == 'Unstructured':
|
||||
allowed_extensions = ['txt', 'markdown', 'md', 'pdf', 'html', 'htm', 'xlsx',
|
||||
'docx', 'csv', 'eml', 'msg', 'pptx', 'ppt', 'xml']
|
||||
'docx', 'csv', 'eml', 'msg', 'pptx', 'ppt', 'xml',
|
||||
'jpg', 'jpeg', 'png', 'webp', 'gif', 'svg']
|
||||
else:
|
||||
allowed_extensions = ['txt', 'markdown', 'md', 'pdf', 'html', 'htm', 'xlsx', 'docx', 'csv']
|
||||
allowed_extensions = ['txt', 'markdown', 'md', 'pdf', 'html', 'htm', 'xlsx', 'docx', 'csv',
|
||||
'jpg', 'jpeg', 'png', 'webp', 'gif', 'svg']
|
||||
if extension.lower() not in allowed_extensions:
|
||||
raise UnsupportedFileTypeError()
|
||||
elif only_image and extension.lower() not in IMAGE_EXTENSIONS:
|
||||
|
|
Loading…
Reference in New Issue
Block a user