You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
483 B
Java
24 lines
483 B
Java
3 years ago
|
package com.glxp.api.util;
|
||
|
|
||
|
import com.glxp.api.config.PublicFileUrlConfig;
|
||
|
|
||
|
/**
|
||
|
* 公共文件管理工具
|
||
|
*/
|
||
|
public class PublicFileUtils {
|
||
|
|
||
|
public static String createUploadUrl(String filePath) {
|
||
|
|
||
|
if (filePath == null || filePath.isEmpty()) {
|
||
|
return "";
|
||
|
}
|
||
|
|
||
|
if (filePath.indexOf("http") == 0 || filePath.indexOf("/") == 0) {
|
||
|
return filePath;
|
||
|
}
|
||
|
|
||
|
return PublicFileUrlConfig.getDomain() + "/" + filePath;
|
||
|
}
|
||
|
|
||
|
}
|