labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.46k stars 4.69k forks source link

分享链接无权上传文件 #2292

Closed SDAIer closed 2 months ago

SDAIer commented 2 months ago

对话框上传附件后闪一下就消失了

c121914yu commented 2 months ago

未出现

c121914yu commented 2 months ago

发现问题,打没找到办法 http可以,但是通过nginx https反向代理后就是一闪而过 ---原始邮件--- 发件人: @.> 发送时间: 2024年8月7日(周三) 晚上7:03 收件人: @.>; 抄送: @.**@.>; 主题: Re: [labring/FastGPT] 4.8.9附件和图片上传一闪而过 (Issue #2292) 未出现 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

nginx 需要允许文件上传(form格式)和足够的 body 大小。

SDAIer commented 2 months ago

4.8.8图片上传和识别都ok

4.8.9的问题更新下描述,不是nginx的问题。以下描述中不包括nginx,因为此时还没有使用nginx做https代理,全部使用fastgpt http测试的。

fastgpt调式界面,可以正常上传图片和文档,功能ok。 此时在同一个浏览器下,打开免登录的URL,也是正常的。如下图,返回200 企业微信截图_1723043712310

此时如果切换一个新的浏览器,上传附件就是一闪而过。返回一个upload200和一个loginout304,如下图

image image

304错误信息如下 Request URL: http://172.22.1.39:18080/api/support/user/account/loginout Request Method: GET Status Code: 304 Not Modified Remote Address: 172.22.1.39:18080 Referrer Policy: strict-origin-when-cross-origin Connection: keep-alive Content-Type: application/json; charset=utf-8 Date: Wed, 07 Aug 2024 15:21:26 GMT Etag: "ru7llsx4kr1h" Keep-Alive: timeout=5 Set-Cookie: fastgpt_token=; Path=/; Max-Age=0 Vary: Accept-Encoding Accept: application/json, text/plain, / Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 Connection: keep-alive Content-Type: application/json Cookie: SLG_G_WPT_TO=zh-CN; SLG_GWPT_Show_Hide_tmp=1; SLG_wptGlobTipTmp=1 Host: 172.22.1.39:18080 If-None-Match: "ru7llsx4kr1h" Referer: http://172.22.1.39:18080/chat/share?shareId=s9gu3l3ihfa7udo35vldje4p&chatId= User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 OPR/112.0.0.0

SDAIer commented 2 months ago

@c121914yu

搭建了两套独立的环境,问题一样 image

c121914yu commented 2 months ago

https://github.com/labring/FastGPT/pull/2299 支持下分享链接文件上传。

SDAIer commented 2 months ago

2299 支持下分享链接文件上传。

多谢大侠

SDAIer commented 2 months ago

请问哪个镜像解决的这个bug