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.
udi-wms-java/src/main/java/com/glxp/api/util/PublicFileUtils.java

24 lines
483 B
Java

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;
}
}