mirror of https://github.com/langgenius/dify.git
Update api/core/datasource/utils/message_transformer.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
69a402ba99
commit
caf4b16b8e
|
|
@ -62,7 +62,7 @@ class DatasourceFileMessageTransformer:
|
|||
|
||||
mimetype = meta.get("mime_type")
|
||||
if not mimetype:
|
||||
mimetype = guess_type(filename)[0] or "application/octet-stream" # pyright: ignore[reportArgumentType]
|
||||
mimetype = (guess_type(filename)[0] if filename else None) or "application/octet-stream"
|
||||
|
||||
# if message is str, encode it to bytes
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue