|
@@ -273,14 +273,14 @@ public class OrderController extends BaseWebController {
|
|
|
try {
|
|
try {
|
|
|
InputStream inputStream = file.getInputStream();
|
|
InputStream inputStream = file.getInputStream();
|
|
|
DistinctionDTO dto;
|
|
DistinctionDTO dto;
|
|
|
- Integer pos = file.getOriginalFilename().lastIndexOf('.');
|
|
|
|
|
|
|
+ int pos = file.getOriginalFilename().lastIndexOf('.');
|
|
|
String suffix = "";
|
|
String suffix = "";
|
|
|
if (pos != -1) {
|
|
if (pos != -1) {
|
|
|
suffix = file.getOriginalFilename().substring(pos);
|
|
suffix = file.getOriginalFilename().substring(pos);
|
|
|
}
|
|
}
|
|
|
File tempFile = File.createTempFile("temp_", suffix);
|
|
File tempFile = File.createTempFile("temp_", suffix);
|
|
|
file.transferTo(tempFile);
|
|
file.transferTo(tempFile);
|
|
|
- if(suffix.indexOf("mp4") != -1){
|
|
|
|
|
|
|
+ if(suffix.contains("mp4")){
|
|
|
//视频处理
|
|
//视频处理
|
|
|
//先压缩视频再处理
|
|
//先压缩视频再处理
|
|
|
if(file.getSize() /1024L/1024L >3L){
|
|
if(file.getSize() /1024L/1024L >3L){
|