fix: 缩略图上传失败(upload_to_oss str/Path 类型不匹配) #602
Reference in New Issue
Block a user
Delete Branch "fix/thumbnail-upload-str-path-bug"
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?
问题
upload_to_oss函数签名写的是local_path: Path,但thumbnail_generator.py等调用方传的是str,导致local_path.stat()报AttributeError: 'str' object has no attribute 'stat',缩略图上传失败返回 None,异常被吞掉不影响主流程但视频封面一直是默认图。修复
Path | strlocal_path = Path(local_path)转 Path 对象影响面
仅缩略图上传链路修复,其他调用方(render_adapter、generation.py 等)传的是 Path 对象,转一下也没问题,无副作用。
LGTM,一行修复,str/Path 类型兼容,无副作用。
CI全绿,自动审批通过。
CI全绿,自动审批通过。
🗑️ 预览环境已清理
PR #602 已关闭或合并,对应的预览环境已被清理。