|
@@ -454,18 +454,21 @@ public class FileHandlerService implements InitializingBean {
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(fileKey)) {
|
|
|
try {
|
|
|
+
|
|
|
+
|
|
|
URL urll = new URL(url);
|
|
|
- fileName = urll.getPath();
|
|
|
+ String _Path = urll.getPath();
|
|
|
+ String urlStrr = getSubString(_Path, fileKey);
|
|
|
+ fileName = fileKey + urlStrr.trim();
|
|
|
attribute.setSkipDownLoad(true);
|
|
|
} catch (MalformedURLException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
url = WebUtils.encodeUrlFileName(url);
|
|
|
- if(UrlEncoderUtils.hasUrlEncoded(fileName) && UrlEncoderUtils.hasUrlEncoded(suffix)){
|
|
|
+ if(UrlEncoderUtils.hasUrlEncoded(fileName)){
|
|
|
try {
|
|
|
- fileName = URLDecoder.decode(fileName, "UTF-8").replaceAll("\\+", "%20").replaceAll(" ", "%20");
|
|
|
- suffix = URLDecoder.decode(suffix, "UTF-8");
|
|
|
+ fileName = URLDecoder.decode(fileName, uriEncoding).replaceAll("\\+", "%20");
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|