This commit is contained in:
2026-02-10 16:05:11 +07:00
parent 94fde6cea9
commit 5aab1d0c52
2 changed files with 8 additions and 8 deletions

View File

@@ -69,7 +69,6 @@ function test_large_binary_receive()
# Use NATSBridge.smartreceive to handle the data
result = NATSBridge.smartreceive(msg)
# println("envelope----- ", result.envelope)
# Check transport type
if result.envelope.transport == "direct"
log_trace("Received direct transport with ---- bytes")
@@ -85,11 +84,12 @@ function test_large_binary_receive()
log_trace("Received $(file_size) bytes of binary data")
# Save received data to a test file
#[WORKING] add dataname so I know it is a file
filename = basename(result.envelope.url)
output_path = "./new_$filename"
write(output_path, result.data)
log_trace("Saved received data to $output_path")
dataname = result.envelope.metadata["dataname"]
if dataname != "NA"
output_path = "./new_$dataname"
write(output_path, result.data)
log_trace("Saved received data to $output_path")
end
# Verify file size
original_size = length(read(LARGE_FILE_PATH))