处理问题
This commit is contained in:
parent
e51ffd3aa0
commit
06b63594b8
@ -87,11 +87,8 @@ public class FileComponent {
|
|||||||
*/
|
*/
|
||||||
public String getFileUrl(String uploadPath) {
|
public String getFileUrl(String uploadPath) {
|
||||||
String fileUrl = uploadPath.replace(fileProperties.getUploadPath(), "");
|
String fileUrl = uploadPath.replace(fileProperties.getUploadPath(), "");
|
||||||
if ("\\".equals(File.separator)) {
|
|
||||||
fileUrl = fileUrl.replace("\\", "/");
|
|
||||||
}
|
|
||||||
if (fileUrl.startsWith("/")) {
|
if (fileUrl.startsWith("/")) {
|
||||||
fileUrl = fileUrl.substring(1, fileUrl.length() - 1);
|
fileUrl = fileUrl.substring(1);
|
||||||
}
|
}
|
||||||
return "files/" + fileUrl;
|
return "files/" + fileUrl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user