Skip to content
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

二级域名下上传文件 #7020

Closed
minemine-m opened this issue Mar 18, 2025 · 6 comments
Closed

二级域名下上传文件 #7020

minemine-m opened this issue Mar 18, 2025 · 6 comments
Labels
files 上传文件/知识库 unconfirm 未被维护者确认的问题

Comments

@minemine-m
Copy link

📦 部署环境

Docker

📦 部署模式

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

📌 软件版本

v1.70.11

💻 系统环境

Other Linux

🌐 浏览器

Edge

🐛 问题描述

我的S3_ENDPOINT 地址是 二级域名.主域名.com, S3_BUCKET是桶名,当我尝试上传文件的时候的时候,我发现文件上传的接口会自动拼上S3_BUCKET,最终接口是这样的,桶名.二级域名.主域名/file, 这样就会接口不通,想问下lobechat自动拼的接口是不是有问题

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

@minemine-m minemine-m added the unconfirm 未被维护者确认的问题 label Mar 18, 2025
@lobehubbot
Copy link
Member

👀 @minemine-m

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.70.11

💻 System environment

Other Linux

🌐 Browser

Edge

🐛 Question description

My S3_ENDPOINT address is a secondary domain name. The main domain name.com, S3_BUCKET is a bucket name. When I try to upload a file, I found that the interface uploaded by the file will be automatically spelled with S3_BUCKET. The final interface is like this, the bucket name. The second-level domain name. The main domain name/file, so the interface will not be connected. I would like to ask if there is any problem with the interface that the lobechat automatically spells. I want to ask if there is any problem with the interface that is automatically spelled with lobechat.

📷 Reproduction steps

No response

🚦 Expected results

No response

📝 Supplementary information

No response

Copy link

dosubot bot commented Mar 18, 2025

@minemine-m 你好!我是Dosu,我是一个可以帮助您解决bug,回答问题,并成为贡献者的机器人。我会在等待人类维护者的过程中帮助您。期待与您一起解决问题!🤖

Yes, there is an issue with LobeChat automatically appending the S3_BUCKET to the S3_ENDPOINT, resulting in an incorrect URL format like "桶名.二级域名.主域名/file" when uploading files. To fix this, you should set the environment variable S3_ENABLE_PATH_STYLE=1. This will change the URL format to the correct 'https://s3domain:port/bucket/XXXXdirectory' format. Additionally, if you are using Cloudflare R2, you should modify the S3_ENDPOINT configuration by ensuring the path does not include the bucket name, as indicated in the LobeChat documentation [1][2].

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

@dosubot dosubot bot added the files 上传文件/知识库 label Mar 18, 2025
@arvinxx
Copy link
Contributor

arvinxx commented Mar 18, 2025

看下环境变量文档,有相关配置切换的

@arvinxx arvinxx closed this as completed Mar 18, 2025
@lobehubbot
Copy link
Member

@minemine-m

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

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


Look at the environment variable documentation, there are related configuration switching

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

3 participants