diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java index c1dc1924bb..f2367d6e95 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java @@ -252,7 +252,8 @@ public class FileMetadataService { request.setUpdateTime(fileMetadata.getUpdateTime()); bytes = fileManagerService.downloadFile(request); } - return bytes; + + return Objects.requireNonNullElseGet(bytes, () -> new byte[0]); } public ResponseEntity getFile(String fileId) {