|
@@ -16,6 +16,7 @@ import sun.rmi.runtime.Log;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
+import java.net.URLEncoder;
|
|
|
import java.util.LinkedHashSet;
|
|
|
import java.util.UUID;
|
|
|
|
|
@@ -87,7 +88,7 @@ public class UploadService {
|
|
|
if(newName){
|
|
|
fileName = UUID.randomUUID().toString().replace("-","") ;
|
|
|
}else {
|
|
|
- fileName= fileName.substring(0,fileName.lastIndexOf("."));
|
|
|
+ fileName= URLEncoder.encode(fileName.substring(0,fileName.lastIndexOf(".")),"utf-8");
|
|
|
}
|
|
|
if(fileName.length() >50){
|
|
|
fileName = fileName.substring(0,50);
|