OpenListTeam / OpenListTeam/OpenList
[BUG] 189CloudPC 家庭云转存使用 .transfer 临时后缀,导致图片无法预览
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 24.7k
- Forks
- 2.3k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
[BUG] 189CloudPC 家庭云转存使用 .transfer 临时后缀,导致图片无法预览
请确认以下事项
-
我已确认阅读并同意 AGPL-3.0 第15条 。
本程序不提供任何明示或暗示的担保,使用风险由您自行承担。 -
我已确认阅读并同意 AGPL-3.0 第16条 。
无论何种情况,版权持有人或其他分发者均不对使用本程序所造成的任何损失承担责任。 -
我确认我的描述清晰,语法礼貌,能帮助开发者快速定位问题,并符合社区规则。
-
我已确认阅读了OpenList文档。
-
我已确认没有重复的问题或讨论。
-
我已确认是
OpenList的问题,而不是其他原因(例如 网络 ,依赖或操作)。 -
我认为此问题必须由
OpenList处理,而非第三方。 -
我已确认这个问题在最新版本中没有被修复。
-
我没有阅读这个清单,只是闭眼选中了所有的复选框,请关闭这个 Issue 。
OpenList 版本(必填)
v4.1.10-2
使用的存储驱动(必填)
天翼云盘客户端(189CloudPC)
问题描述(必填)
个人云挂载启用“家庭云转存”后,驱动会先将文件上传至家庭云,再转存到个人云并恢复原始文件名。当前代码将所有临时文件统一命名为:
0<UUID>.transfer
天翼云盘会在文件首次创建时识别文件类型。图片以 .transfer 后缀创建后被登记为普通文件,后续即使重命名回 .jpg 或 .png,天翼云盘客户端仍不会生成图片缩略图,文件也无法作为图片正常预览。失败或中断时还可能残留 .transfer 文件。
相关代码位于 drivers/189pc/driver.go 的 Put 方法:
srcName := stream.GetName()
stream = &WrapFileStreamer{
FileStreamer: stream,
Name: fmt.Sprintf("0%s.transfer", uuid.NewString()),
}
建议临时文件名保留原文件扩展名;对于本身没有扩展名的文件,再回退使用 .transfer:
srcName := stream.GetName()
ext := path.Ext(srcName)
if ext == "" {
ext = ".transfer"
}
stream = &WrapFileStreamer{
FileStreamer: stream,
Name: fmt.Sprintf("0%s%s", uuid.NewString(), ext),
}
这样图片会以 0<UUID>.jpg 或 0<UUID>.png 上传,家庭云转存及最终重命名流程不变,同时天翼云盘能够在首次创建文件时识别图片类型。
关闭“家庭云转存”可以避开临时命名流程,但会重新受到个人云上传额度限制,因此不能替代修复。
复现步骤:
- 添加
189CloudPC个人云存储。 - 开启“家庭云转存”。
- 上传一张
.jpg或.png图片。 - 等待转存及重命名完成。
- 在天翼云盘客户端查看该文件。
实际结果:最终文件名虽然恢复了图片后缀,但没有图片缩略图,无法作为图片正常预览;异常情况下会残留 .transfer 文件。
预期结果:启用家庭云转存后,图片仍能被天翼云盘识别、生成缩略图并正常预览。
此前的 #3080 因未严格使用仓库 Issue 模板,被自动校验关闭;本 Issue 按完整模板重新提交。
日志(必填)
此问题不会产生明确的服务端错误日志。刷新目录后可观察到两类结果:
正常扩展名文件:name=<redacted>.jpg, type=image, thumb=<empty>
异常残留文件:name=0<UUID>.transfer, type=unknown, thumb=<empty>
其中正常扩展名文件在 OpenList 中可根据最终后缀显示为图片类型,但天翼云盘没有为其生成缩略图。
配置文件内容(必填)
以下仅保留与问题有关的存储配置,账号、令牌及其他私密字段均已移除:
{
"driver": "189CloudPC",
"type": "personal",
"family_transfer": true,
"upload_method": "stream"
}
复现链接(可选)
无公开复现链接。
AI生成内容
- 我使用了AI工具生成此内容
- 我没有使用AI工具生成此内容
AI模型是
OpenAI 编程助手
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in drivers/189pc/driver.go at the Put method and inspect how the temporary upload name is built from stream.GetName(). Verify the family-transfer flow with a .jpg or .png and a file without an extension. Done means image uploads are recognized and previewable after transfer, while extensionless files still use the fallback temporary suffix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100