|
@@ -363,14 +363,16 @@ public class LargeFileEndpoint {
|
|
|
merge(largeFile, filePath);
|
|
|
String path = largeFile.getPath(); //获取到的路径 没有.1 .2 这样的东西
|
|
|
//截取视频所在的路径
|
|
|
- path = path.replace(filePath, "");
|
|
|
- File file = new File(filePath + path);
|
|
|
- //修改成原来的文件名
|
|
|
- renameFile(file, param.getFilename());
|
|
|
- FileInputStream inputStream = new FileInputStream(filePath + param.getFilename());
|
|
|
+// path = path.replace(filePath, "");
|
|
|
+// File file = new File(filePath + path);
|
|
|
+// //修改成原来的文件名
|
|
|
+// renameFile(file, param.getFilename());
|
|
|
+// FileInputStream inputStream = new FileInputStream(filePath + param.getFilename());
|
|
|
+ FileInputStream inputStream = new FileInputStream(path);
|
|
|
//上传oss
|
|
|
BladeFile bladeFile = ossBuilder.template().putFile(param.getFilename(), inputStream);
|
|
|
- File file1 = new File(filePath + param.getFilename());
|
|
|
+// File file1 = new File(filePath + param.getFilename());
|
|
|
+ File file1 = new File(path);
|
|
|
MultipartFile multipartFile = getMultipartFile(file1);
|
|
|
if (param.getFilename().contains("pdf")) {
|
|
|
try {
|
|
@@ -396,8 +398,10 @@ public class LargeFileEndpoint {
|
|
|
file1.delete();
|
|
|
iLargeFileService.updateLargeFileDeleted(param.getIdentifier());
|
|
|
} catch (FileNotFoundException e) {
|
|
|
+ iLargeFileService.updateLargeFileDeleted(param.getIdentifier());
|
|
|
e.printStackTrace();
|
|
|
} catch (InterruptedException e) {
|
|
|
+ iLargeFileService.updateLargeFileDeleted(param.getIdentifier());
|
|
|
e.printStackTrace();
|
|
|
} finally {
|
|
|
lock.unlock();
|