Merge remote-tracking branch 'origin/main'
commit
b298bbdcf5
|
|
@ -71,6 +71,20 @@ public class ZcloudImgFilesFacadeImpl implements ZcloudImgFilesFacade {
|
|||
return resultFilePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveFile(byte[] bytes, String fileName, String path, Long corpinfoId) {
|
||||
String filePath = corpinfoId.toString() + "/" + DateUtil.getMonth() + "/" + path;
|
||||
// 文件上传并获取上传路径
|
||||
String resultFilePath = null;
|
||||
try {
|
||||
resultFilePath = Smb.saveFile(new ByteArrayInputStream(bytes),fileName, filePath);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return resultFilePath;
|
||||
}
|
||||
|
||||
|
||||
public static InputStream base64ToInputStream(String base64String) {
|
||||
if (base64String == null || base64String.isEmpty()) {
|
||||
throw new IllegalArgumentException("Base64 string is null or empty");
|
||||
|
|
|
|||
Loading…
Reference in New Issue