处理问题
This commit is contained in:
parent
06b63594b8
commit
f1b4307535
@ -87,6 +87,9 @@ 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 = fileUrl.substring(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user