diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index 8f5c080298..7017da7c2e 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -120,6 +120,9 @@ def _extract_text_from_binary_response( if not filename or '.' not in filename: ext = mimetypes.guess_extension(content_type) or '' filename = f'download{ext}' + elif not mimetypes.guess_type(filename)[0] and content_type != 'application/octet-stream': + # The dot in names like arXiv's 1706.03762 is not an extension. + filename += mimetypes.guess_extension(content_type) or '' suffix = '.' + filename.split('.')[-1].lower() if '.' in filename else ''