1. 新增某些场景下需要直接根据 fileId 获取解密文件流的方法
This commit is contained in:
@@ -75,6 +75,10 @@ public class FileServiceImpl implements FileService {
|
|||||||
throw exception(FILE_CAPTCHA_ERROR);
|
throw exception(FILE_CAPTCHA_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return getDecryptedBytes(fileId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] getDecryptedBytes(Long fileId) throws Exception {
|
||||||
FileDO fileDO = validateFileExists(fileId);
|
FileDO fileDO = validateFileExists(fileId);
|
||||||
// 获取加密内容
|
// 获取加密内容
|
||||||
FileClient client = fileConfigService.getFileClient(fileDO.getConfigId());
|
FileClient client = fileConfigService.getFileClient(fileDO.getConfigId());
|
||||||
@@ -90,6 +94,7 @@ public class FileServiceImpl implements FileService {
|
|||||||
throw exception(FILE_DECRYPT_FAIL);
|
throw exception(FILE_DECRYPT_FAIL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件的前缀,是否包含日期(yyyyMMdd)
|
* 上传文件的前缀,是否包含日期(yyyyMMdd)
|
||||||
* 目的:按照日期,进行分目录
|
* 目的:按照日期,进行分目录
|
||||||
|
|||||||
Reference in New Issue
Block a user