fix(接口定义): 修复资源池调用文件库文件无法执行的缺陷
This commit is contained in:
parent
fe22603f2c
commit
7ebe481d5e
|
@ -307,6 +307,11 @@ public class ApiJMeterFileService {
|
||||||
if (CollectionUtils.isNotEmpty(request.getBodyFiles())) {
|
if (CollectionUtils.isNotEmpty(request.getBodyFiles())) {
|
||||||
for (BodyFile bodyFile : request.getBodyFiles()) {
|
for (BodyFile bodyFile : request.getBodyFiles()) {
|
||||||
File file = new File(bodyFile.getName());
|
File file = new File(bodyFile.getName());
|
||||||
|
if (!file.exists()) {
|
||||||
|
// 从MinIO下载
|
||||||
|
ApiFileUtil.downloadFile(bodyFile.getId(), bodyFile.getName());
|
||||||
|
file = new File(bodyFile.getName());
|
||||||
|
}
|
||||||
if (file != null && file.exists()) {
|
if (file != null && file.exists()) {
|
||||||
byte[] fileByte = FileUtils.fileToByte(file);
|
byte[] fileByte = FileUtils.fileToByte(file);
|
||||||
if (fileByte != null) {
|
if (fileByte != null) {
|
||||||
|
|
Loading…
Reference in New Issue