mirror of
https://github.com/codexu/note-gen.git
synced 2026-04-26 05:15:54 +03:00
Labels
No labels
bug
duplicate
feature
platform: Android
platform: Linux
platform: Windows
platform: iOS
platform: macOS
priority: high
priority: low
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/note-gen#783
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/codexu/note-gen/pull/798
Author: @xianggau
Created: 12/17/2025
Status: ✅ Merged
Merged: 1/19/2026
Merged by: @codexu
Base:
dev← Head:fix(#796)📝 Commits (4)
9b90372feat(image-hosting): 添加S3存储图片上传和连接测试功能7b8ef11fix(s3): fix unused variable lint errorsb6e94e8refactor(imageHosting): 将payload类型从ArrayBuffer改为BufferSourcea42f014Merge branch 'dev' into fix(#796)📊 Changes
2 files changed (+140 additions, -18 deletions)
View changed files
📝
messages/ja.json(+1 -1)📝
src/lib/imageHosting/s3.ts(+139 -17)📄 Description
概要
本 PR 改进了 NoteGen 的 S3 图床功能支持阿里云oss连接
并修复了导致构建失败的日文多语言(
messages/ja.json)问题。背景 / 动机
messages/ja.json文件中包含无效 JSON,导致构建过程直接失败。这个 PR 针对以上问题进行了修复,使本地开发更顺畅,
并让 S3 图床配置和排错更加可靠。
具体改动
endpoint、bucket和pathPrefix,避免生成异常 URL,解决类似
/images//xxx.png的重复斜杠问题。(如
https://wjnote.oss-cn-beijing.aliyuncs.com/...)生成正确。将 payload 参数从仅接受
ArrayBuffer改为接受BufferSource,满足编译器类型检查。
messages/ja.json)修复messages/ja.json为合法 JSON,构建时可以正常解析。en.json的结构一致。工作原理(简要说明)
以确定性的方式生成最终 URL。
而不是返回空白或不明确的错误。
测试情况
本地已进行如下测试(请根据你实际执行的情况勾选/修改):
pnpm tauri dev启动 Tauri 应用,确认应用正常启动。pnpm build),确认messages/ja.json不再触发 JSON 解析错误。
兼容性 / 潜在影响
但由于现在对 endpoint / path 的处理更规范,
可能会暴露之前被忽略的配置问题(例如多余斜杠)。
其他说明
在真实的 Tauri 运行环境中不会生效,也不会干扰现有逻辑。
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.