素材位置改成两选一(本地随二进制 / 自行填 Endpoint 的 S3 兼容存储), R2、MinIO、B2、OSS-COS 的 S3 端点都只差 Endpoint/Region/路径风格。 - serve.py:手写 SigV4(PUT/GET/DELETE/HEAD),新增 /api/s3/test 与 /api/s3/upload。测试连接依次验连通、写权限、读回一致、匿名可读, 失败把 S3 的 <Code> 翻成可执行的建议;上传带 immutable 缓存头。 - index.html:新增「素材托管」面板(模式切换 + 7 个字段 + 测试/上传按钮), 上传集合与导出共用 usedAssetIds();成功后自动回填「素材前缀」。 密钥只进 sessionStorage 与内存,不进草稿/工程 json/导出 zip。 - 修:usedAssetIds 返回 Set,误用 length/map 导致「还没有素材」。 - 修:字段填完 700ms 内刷新会丢配置 → 失焦与模式切换时立即落盘。 - 自检:check_sigv4.py 与 aws-sdk-go-v2 signer 逐字节对拍(6/6), selftest_upload.py 起假 S3 跑通测试连接→上传→读回(16 项), mock_s3.py 供手动点面板用。
44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
# ---> Go
|
|
# If you prefer the allow list template instead of the deny list, see community template:
|
|
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
|
#
|
|
# Binaries for programs and plugins
|
|
*.exe
|
|
*.exe~
|
|
*.dll
|
|
*.so
|
|
*.dylib
|
|
|
|
# Test binary, built with `go test -c`
|
|
*.test
|
|
|
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
|
*.out
|
|
|
|
# Dependency directories (remove the comment below to include it)
|
|
# vendor/
|
|
|
|
# Go workspace file
|
|
go.work
|
|
go.work.sum
|
|
|
|
# env file
|
|
.env
|
|
|
|
# otherfile
|
|
./workbuddy
|
|
./scripts
|
|
# 注意:gitignore 不认 "./" 前缀,/outputs 才是「仓库根下的 outputs」。
|
|
# outputs 里全是 TestGenPreview / 主题生成器 / 截图这类一次性产物,
|
|
# 每次跑都会变,跟版本库无关。
|
|
/outputs/
|
|
|
|
# 蜜罐凭据取证文件:明文账号密码,绝不能进版本库。
|
|
# 默认目录由 [security] honeypot_cred_dir 决定(缺省 data/honeypot-creds),
|
|
# 若改成别的盘外路径则不受这条影响(那本来也不在仓库里)。
|
|
/data/
|
|
|
|
# 主题生成器的自测脚本是 Python:跑一次就会留 __pycache__,别提交。
|
|
__pycache__/
|
|
*.pyc
|