feat: 服务端 promotion 视频自动转码;首页宣传册预览与 mp4 配置

Made-with: Cursor
This commit is contained in:
whm
2026-03-23 16:12:43 +08:00
parent d37e9a3663
commit ea90052e7e
15 changed files with 965 additions and 279 deletions

View File

@@ -306,6 +306,8 @@ func UploadSiteAsset(c *gin.Context) {
return
}
c.JSON(http.StatusOK, gin.H{"id": res.InsertedID, "file_path": doc.FilePath, "message": "上传成功"})
// promotion 目录下 .mov 由服务端异步转 .mp4 并更新本条资源(需容器/主机安装 ffmpeg
ScheduleTranscodeAfterUpload(siteID, relPath, destPath, res.InsertedID)
}
// DeleteSiteAsset 删除站点资源