diff --git a/new_testFile_large.zip b/new_testFile_large.zip deleted file mode 100644 index 56dfcd1..0000000 Binary files a/new_testFile_large.zip and /dev/null differ diff --git a/src/NATSBridge.jl b/src/NATSBridge.jl index f911ea7..82efbd6 100644 --- a/src/NATSBridge.jl +++ b/src/NATSBridge.jl @@ -354,7 +354,7 @@ function smartreceive( log_trace(env.correlation_id, "Direct transport - decoding payload") # Log direct transport handling # Decode Base64 payload - payload_bytes = Base64.decode(env.payload) # Decode base64 payload to bytes + payload_bytes = Base64.base64decode(env.payload) # Decode base64 payload to bytes # Deserialize based on type data = _deserialize_data(payload_bytes, env.type, env.correlation_id, env.metadata) # Convert bytes to Julia data diff --git a/test/test_large_payload.jl b/test/test_large_payload.jl index 2564d8c..ce99c41 100644 --- a/test/test_large_payload.jl +++ b/test/test_large_payload.jl @@ -69,7 +69,7 @@ function test_large_binary_receive() # Use NATSBridge.smartreceive to handle the data result = NATSBridge.smartreceive(msg) - println("envelope----- ", result.envelope) + # println("envelope----- ", result.envelope) # Check transport type if result.envelope.transport == "direct" log_trace("Received direct transport with ---- bytes") @@ -85,6 +85,7 @@ 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) @@ -111,9 +112,9 @@ println("Starting large binary payload test...") println("Correlation ID: $correlation_id") println("Large file: $LARGE_FILE_PATH") -# Run sender first -println("start smartsend") -test_large_binary_send() +# # Run sender first +# println("start smartsend") +# test_large_binary_send() # Run receiver println("testing smartreceive")