feat(s3): add proxy transfer mode with tokenized upload/download#6492
feat(s3): add proxy transfer mode with tokenized upload/download#6492xqvvu wants to merge 9 commits intolabring:v4.14.9-devfrom
Conversation
Preview sandbox Image: |
Preview mcp_server Image: |
Docs Preview:🚀 FastGPT Document Preview Ready! |
Preview fastgpt Image: |
| - `STORAGE_SECRET_ACCESS_KEY` Secret Access Key for the service credentials | ||
| - `STORAGE_PUBLIC_BUCKET` FastGPT public resource bucket name | ||
| - `STORAGE_PRIVATE_BUCKET` FastGPT private resource bucket name | ||
| - `STORAGE_TRANSFER_MODE` File transfer mode. Options: |
There was a problem hiding this comment.
填写 EXTERNAL_URL 就走 presigned 是不是就好了,好像不会有重叠
PR Review: feat(s3): add proxy transfer mode with tokenized upload/download📊 变更概览
✅ 优点
|
c121914yu
left a comment
There was a problem hiding this comment.
📍 详细代码评论
由于 GitHub API 限制,行级评论无法自动提交。以下是需要关注的关键代码位置:
🔴 严重问题
1. Content-Type 验证缺失 ()
- 问题:直接使用客户端提供的 Content-Type,存在安全风险
- 建议:验证 Content-Type 是否与 token 中声明的一致
2. 错误日志缺失 ()
- 问题:上传接口没有使用 logger 记录错误
- 建议:添加 logger.error 记录上传失败信息
3. Token 验证错误处理 ()
- 问题:JWT 验证失败和 payload 验证失败都抛出相同错误,难以调试
- 建议:添加 logger.warn 区分不同的验证失败原因
🟡 建议改进
4. 文件名清理 ()
- 建议:处理控制字符并限制文件名长度
5. 重复代码 ()
- 建议:将 getContentDisposition 提取到共享工具函数
6. 环境变量验证 ()
- 建议:在 getTokenSecret 中验证 FILE_TOKEN_KEY 是否存在
7. 类型定义 ()
- 建议:metadata 类型改为 Record<string, string | undefined>
完整的审查报告和修复建议请查看上方评论。
📍 详细代码评论由于 GitHub API 限制,行级评论无法自动提交。以下是需要关注的关键代码位置: 🔴 严重问题1. Content-Type 验证缺失
2. 错误日志缺失
3. Token 验证错误处理
🟡 建议改进4. 文件名清理
5. 重复代码
6. 环境变量验证
7. 类型定义
完整的审查报告和修复建议请查看上方评论。 |
ef98296 to
f268dec
Compare
* feat: encapsulate logger * update engines --------- Co-authored-by: archer <545436317@qq.com>
* docs: switch to docs layout and apply black theme (labring#6533) * feat: add Gemini 3.1 models - Add gemini-3.1-pro-preview (released February 19, 2026) - Add gemini-3.1-flash-lite-preview (released March 3, 2026) Both models support: - 1M context window - 64k max response - Vision - Tool choice * docs: switch to docs layout and apply black theme - Change layout from notebook to docs - Update logo to icon + text format - Apply fumadocs black theme - Simplify global.css (keep only navbar and TOC styles) - Fix icon components to properly accept className props - Add mobile text overflow handling - Update Node engine requirement to >=20.x * doc * doc * lock * fix: ts * doc * doc --------- Co-authored-by: archer <archer@archerdeMac-mini.local> Co-authored-by: archer <545436317@qq.com> * Doc (labring#6493) * cloud doc * doc refactor * doc move * seo * remove doc * yml * doc * fix: tsconfig * fix: tsconfig * sandbox version (labring#6497) * sandbox version * add sandbox log * update lock * fix * fix: sandbox * doc * add console * i18n * sandbxo in agent * feat: agent sandbox * lock * feat: sandbox ui * sandbox check exists * env tempalte * doc * lock * sandbox in chat window * sandbox entry * fix: test * rename var * sandbox config tip * update sandbox lifecircle * update prompt * rename provider test * sandbox logger * yml --------- Co-authored-by: Archer <archer@fastgpt.io> Co-authored-by: archer <archer@archerdeMac-mini.local>
8973c07 to
b18e341
Compare
|
|
b18e341 to
8fe6fe6
Compare
579d76f to
7b20bfd
Compare
No description provided.