Search in sources :

Example 1 with LocalFileProperties

use of com.zhouzifei.tool.config.LocalFileProperties in project simpleFS by shengdingbox.

the class LocalApiClient method init.

@Override
public ApiClient init(FileProperties fileProperties) {
    final LocalFileProperties localFileProperties = fileProperties.getLocal();
    String localUrl = localFileProperties.getLocalUrl();
    String localFilePath = localFileProperties.getLocalFilePath();
    if (StringUtils.isEmpty(localUrl) || StringUtils.isEmpty(localFilePath)) {
        throw new ServiceException("[" + this.storageType + "]尚未配置Nginx文件服务器,文件上传功能暂时不可用!");
    }
    checkDomainUrl(localUrl);
    this.localFilePath = localFilePath;
    return this;
}
Also used : LocalFileProperties(com.zhouzifei.tool.config.LocalFileProperties) ServiceException(com.zhouzifei.tool.common.ServiceException)

Aggregations

ServiceException (com.zhouzifei.tool.common.ServiceException)1 LocalFileProperties (com.zhouzifei.tool.config.LocalFileProperties)1