避免文件过小损坏
All checks were successful
ZhenTu-BE/pipeline/head This commit looks good

This commit is contained in:
2025-09-22 09:44:26 +08:00
parent 61cf9383d0
commit 59b481989c

View File

@@ -306,6 +306,10 @@ public class VideoPieceGetter {
log.warn("视频裁切失败");
return false;
}
if (outFile.length() <= 1>>20) {
log.warn("视频裁切文件过小,文件大小: {}kB", outFile.length() >> 10);
return false;
}
log.info("视频裁切成功");
IStorageAdapter adapter = StorageFactory.use("assets");
url = adapter.uploadFile("video/mp4", outFile, StorageConstant.VIDEO_PIECE_PATH, outFile.getName());