lyhzzz 3 anni fa
parent
commit
93afdbf014

+ 1 - 1
src/main/java/com/fdkankan/fusion/service/impl/UploadService.java

@@ -54,7 +54,7 @@ public class UploadService {
             if(filePathSet !=null){
             if(filePathSet !=null){
                 filePathSet.add(path);
                 filePathSet.add(path);
             }
             }
-            if(fileName.toLowerCase().endsWith(".mp4")){
+            if(file.getOriginalFilename().toLowerCase().endsWith(".mp4")){
                 VideoUtil.ffmpegVideo(path,path.replace(suffixName,".jpg"),"200","200");
                 VideoUtil.ffmpegVideo(path,path.replace(suffixName,".jpg"),"200","200");
                 uploadToOssUtil.upload(path.replace(suffixName,".jpg"),filePathAdd+ fileName + ".jpg");
                 uploadToOssUtil.upload(path.replace(suffixName,".jpg"),filePathAdd+ fileName + ".jpg");
                 if(!uploadToOssUtil.existKey(filePathAdd+ fileName + ".jpg")){
                 if(!uploadToOssUtil.existKey(filePathAdd+ fileName + ".jpg")){