|
@@ -57,7 +57,7 @@ public class VideoConverter {
|
|
|
File outputFile = new File(tempDir, outputPrefix + "." + format);
|
|
File outputFile = new File(tempDir, outputPrefix + "." + format);
|
|
|
convertVideo(tempFile.getAbsolutePath(), outputFile.getAbsolutePath(), format);
|
|
convertVideo(tempFile.getAbsolutePath(), outputFile.getAbsolutePath(), format);
|
|
|
|
|
|
|
|
- // 上传转换后的文件
|
|
|
|
|
|
|
+ // 根据生成的临时文件,取名字,以及具体上传转换后的文件
|
|
|
uploadToMinio(minioClient, BUCKET_NAME, outputFile.getName(), outputFile);
|
|
uploadToMinio(minioClient, BUCKET_NAME, outputFile.getName(), outputFile);
|
|
|
filesToDelete.add(outputFile); // 添加到删除列表
|
|
filesToDelete.add(outputFile); // 添加到删除列表
|
|
|
}
|
|
}
|
|
@@ -150,7 +150,7 @@ public class VideoConverter {
|
|
|
client.uploadObject(
|
|
client.uploadObject(
|
|
|
UploadObjectArgs.builder()
|
|
UploadObjectArgs.builder()
|
|
|
.bucket(bucket)
|
|
.bucket(bucket)
|
|
|
- .object("convert/" + object)
|
|
|
|
|
|
|
+ .object("converted/" + object)
|
|
|
.filename(file.getAbsolutePath())
|
|
.filename(file.getAbsolutePath())
|
|
|
.contentType(getMimeType(object))
|
|
.contentType(getMimeType(object))
|
|
|
.build()
|
|
.build()
|