|
@@ -36,6 +36,10 @@ public class LocalFileService extends AbstractFYunFileService {
|
|
|
|
|
|
@Override
|
|
|
public String uploadFile(String bucket, String filePath, String remoteFilePath, Map<String, String> headers) {
|
|
|
+ if (!new File(filePath).exists()) {
|
|
|
+ log.error("文件不存在,不予上传:{}", filePath);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
FileUtil.copy(filePath, getOssPath(bucket, remoteFilePath), true);
|
|
|
return null;
|
|
|
}
|