Skip to content

关于无法存储JPG格式图片 #7455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Pel0915 opened this issue Apr 17, 2025 · 5 comments
Open

关于无法存储JPG格式图片 #7455

Pel0915 opened this issue Apr 17, 2025 · 5 comments
Labels
files 上传文件/知识库 unconfirm 未被维护者确认的问题

Comments

@Pel0915
Copy link

Pel0915 commented Apr 17, 2025

📦 部署环境

Docker

📦 部署模式

服务端模式(lobe-chat-database 镜像)

📌 软件版本

v1.81.0

💻 系统环境

Ubuntu

🌐 浏览器

Chrome

🐛 问题描述

最近一直出现无法在lobechat聊天页面上传jpg格式图片至minio中,其余功能均为正常,通过卸载删除镜像都无法解决,前天瞎捣鼓不知道什么原因好了,最近更新几个版本后又开始出现此情况,PNG图片是正常的,就JPG格式的有问题。

第一:在minio页面上传是可以的,通过lobechat聊天页面就不行。
第二:GPT指引我排查 服务器时间、域名证书是否有效,排查过后均为正常,请问一下这类情况到底是什么原因呢?

📷 复现步骤

标头:
请求网址:
https://minio网址/lobe/files/484571/3c0a627b-a331-41c2-86c6-71020b6a230a.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=admin%2F20250417%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250417T210018Z&X-Amz-Expires=7200&X-Amz-Signature=03e0a342bea27ed6c26ae4aff8de20751eaa23916e79df1bbd210ee92a3f421d&X-Amz-SignedHeaders=host&x-id=GetObject
请求方法:
GET
状态代码:
404 Not Found
引荐来源网址政策:
no-referrer
载荷:
X-Amz-Algorithm: AWS4-HMAC-SHA256
X-Amz-Content-Sha256: UNSIGNED-PAYLOAD
X-Amz-Credential: admin/20250417/us-east-1/s3/aws4_request
X-Amz-Date: 20250417T210018Z
X-Amz-Expires: 7200
X-Amz-Signature: 03e0a342bea27ed6c26ae4aff8de20751eaa23916e79df1bbd210ee92a3f421d
X-Amz-SignedHeaders: host
x-id: GetObject

🚦 期望结果

No response

📝 补充信息

No response

@Pel0915 Pel0915 added the unconfirm 未被维护者确认的问题 label Apr 17, 2025
@lobehubbot
Copy link
Member

👀 @Pel0915

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Deployment environment

Docker

📦 Deployment mode

Server-side mode (lobe-chat-database mirror)

📌 Software version

v1.81.0

💻 System environment

Ubuntu

🌐 Browser

Chrome

🐛 Question description

Recently, it has been impossible to upload jpg format images to minio. The rest of the functions are normal. It is impossible to solve the problem by uninstalling and deleting the mirror. I don’t know why I tinkered around the day before yesterday. This situation began to occur after several versions recently. PNG images are normal, but there are problems with JPG format.

GPT guides me to check whether the server time and domain name certificate are valid. It is normal after the inspection. What is the reason for this?

📷 Reproduction steps

Header:
Request URL:
https://minio URL/lobe/files/484571/3c0a627b-a331-41c2-86c6-71020b6a230a.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=admin%2F20250417%2Fus-east -1%2Fs3%2Faws4_request&X-Amz-Date=20250417T210018Z&X-Amz-Expires=7200&X-Amz-Signature=03e0a342bea27ed6c26ae4aff8de20751eaa23916e79df1bbd210ee92a3f421d&X-Amz-SignedHeaders=host&x-id=GetObject
Request method:
GET
Status Code:
404 Not Found
Recommended source website policy:
no-referrer
Load:
X-Amz-Algorithm: AWS4-HMAC-SHA256
X-Amz-Content-Sha256: UNSIGNED-PAYLOAD
X-Amz-Credential: admin/20250417/us-east-1/s3/aws4_request
X-Amz-Date: 20250417T210018Z
X-Amz-Expires: 7200
X-Amz-Signature: 03e0a342bea27ed6c26ae4aff8de20751eaa23916e79df1bbd210ee92a3f421d
X-Amz-SignedHeaders: host
x-id: GetObject

🚦 Expected results

No response

📝 Supplementary information

No response

@dosubot dosubot bot added the files 上传文件/知识库 label Apr 17, 2025
Copy link

dosubot bot commented Apr 17, 2025

I found a similar unsolved discussion titled "Can't upload pictures, but can upload files" which might be related to your issue [1].

For your specific problem with uploading JPG images to MinIO, here are a few things you might consider checking:

  1. File Type Validation: Ensure that the file type validation in the codebase is correctly configured to accept JPG files. The codebase checks file types before uploading, and it might be worth verifying that JPG is included in the accepted types [2].

  2. MinIO Configuration: Double-check your MinIO configuration settings. Ensure that the environment variables related to MinIO in your .env or docker-compose.yml are correctly set, especially those related to access keys and endpoint configurations [3].

  3. Recent Changes: There have been recent changes related to MinIO integration, such as support for path-style access. Ensure that your setup aligns with these changes, as they might affect how files are uploaded and accessed [4].

  4. Error Handling: Review the error handling mechanisms in place for image uploads. The system provides specific error messages for network issues and unknown errors, which might give you more insight into the problem [5][6].

If these steps do not resolve the issue, consider checking for any recent updates or patches that might address this specific problem.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@Pel0915
Copy link
Author

Pel0915 commented Apr 17, 2025

破案了,是图片的问题,很好奇,在电脑中能打开并查看的图片(老图片,半年前的照片),为什么会损坏无法识别?在cherry studio应用中却可以,难道是我配置了“LLM_VISION_IMAGE_USE_BASE64”全局转换为BASE64导致的?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The case was solved, and it was a problem with the picture. I was very curious. Why were the pictures that could be opened and viewed on the computer (old pictures, photos from half a year ago) damaged and unrecognizable? It's OK in the cherry studio application. Could it be that I configured "LLM_VISION_IMAGE_USE_BASE64" to convert globally to BASE64?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
files 上传文件/知识库 unconfirm 未被维护者确认的问题
Projects
None yet
Development

No branches or pull requests

2 participants