|
@@ -12,6 +12,7 @@ import org.jeecg.common.util.filter.FileTypeFilter;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.modules.system.entity.FileInfo;
|
|
|
import org.jeecg.modules.system.service.IFileInfoService;
|
|
|
+import org.jeecg.modules.system.util.FileUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.util.AntPathMatcher;
|
|
@@ -105,7 +106,7 @@ public class CommonController {
|
|
|
//是否计算视频时长
|
|
|
Boolean isVideoDuration = Boolean.parseBoolean(request.getParameter("isVideoDuration"));
|
|
|
Long videoDuration = null;
|
|
|
- if (isVideoDuration) {
|
|
|
+ if (isVideoDuration && FileUtil.isVideo(file.getOriginalFilename())) {
|
|
|
File f = new File(tmpPath + File.separator + file.getOriginalFilename());
|
|
|
FileUtils.copyInputStreamToFile(file.getInputStream(), f);
|
|
|
videoDuration = CommonUtils.getVideoDuration(f);
|