|
@@ -37,8 +37,6 @@ import org.springframework.util.StringUtils;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.awt.image.BufferedImage;
|
|
|
import java.io.*;
|
|
|
-import java.net.MalformedURLException;
|
|
|
-import java.net.URL;
|
|
|
import java.net.URLDecoder;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
@@ -432,7 +430,8 @@ public class FileHandlerService implements InitializingBean {
|
|
|
String outFilePath;
|
|
|
String originFilePath;
|
|
|
String fullFileName = WebUtils.getUrlParameterReg(url, "fullfilename");
|
|
|
- String compressFileKey = WebUtils.getUrlParameterReg(url, "kkCompressfileKey");
|
|
|
+ String compressFileKey = WebUtils.getUrlParameterReg(url, "kkCompressfileKey");
|
|
|
+ String compressFilePath = WebUtils.getUrlParameterReg(url, "kkCompressfilepath");
|
|
|
if (StringUtils.hasText(fullFileName)) {
|
|
|
originFileName = fullFileName;
|
|
|
type = FileType.typeFromFileName(fullFileName);
|
|
@@ -453,14 +452,10 @@ public class FileHandlerService implements InitializingBean {
|
|
|
try {
|
|
|
|
|
|
|
|
|
- URL urll = new URL(url);
|
|
|
- String _Path = urll.getPath();
|
|
|
- String urlStrr = getSubString(_Path, compressFileKey);
|
|
|
+ String urlStrr = getSubString(compressFilePath, compressFileKey);
|
|
|
originFileName = compressFileKey + urlStrr.trim();
|
|
|
originFileName = URLDecoder.decode(originFileName, uriEncoding);
|
|
|
attribute.setSkipDownLoad(true);
|
|
|
- } catch (MalformedURLException e) {
|
|
|
- e.printStackTrace();
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|