mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 04:16:51 +08:00
视频上传添加视频为0时的错误信息
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
package com.xboe.system.api;
|
package com.xboe.system.api;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -14,6 +11,11 @@ import java.util.Set;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.xboe.core.SysConstant;
|
||||||
|
import com.xboe.standard.BaseConstant;
|
||||||
|
import it.sauronsoftware.jave.Encoder;
|
||||||
|
import it.sauronsoftware.jave.MultimediaInfo;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@@ -115,7 +117,13 @@ public class SysUploaderApi extends ApiBaseController{
|
|||||||
// ex.printStackTrace();
|
// ex.printStackTrace();
|
||||||
log.error("处理失败",ex);
|
log.error("处理失败",ex);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
String fileFullPath = SysConstant.getConfigValue(BaseConstant.CONFIG_UPLOAD_FILES_SAVEPATH) + xur.getFilePath();
|
||||||
|
Encoder encoder = new Encoder();
|
||||||
|
MultimediaInfo m = encoder.getInfo(new File(fileFullPath));
|
||||||
|
}catch (Exception e){
|
||||||
|
return error("读取视频时长错误");
|
||||||
|
}
|
||||||
return wrap(xur);
|
return wrap(xur);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user