add_mix_content_capability #2
@@ -160,7 +160,7 @@ end
|
|||||||
"brokerURL": "nats://localhost:4222",
|
"brokerURL": "nats://localhost:4222",
|
||||||
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"payloads": [
|
"payloads": [
|
||||||
@@ -327,7 +327,7 @@ function smartsend(
|
|||||||
```julia
|
```julia
|
||||||
function smartreceive(
|
function smartreceive(
|
||||||
msg::NATS.Message,
|
msg::NATS.Message,
|
||||||
fileserverDownloadHandler::Function=_fetch_with_backoff;
|
fileserverDownloadHandler::Function;
|
||||||
max_retries::Int = 5,
|
max_retries::Int = 5,
|
||||||
base_delay::Int = 100,
|
base_delay::Int = 100,
|
||||||
max_delay::Int = 5000
|
max_delay::Int = 5000
|
||||||
|
|||||||
@@ -341,10 +341,10 @@ function smartsend(
|
|||||||
response = fileserverUploadHandler(fileserver_url, dataname, payload_bytes)
|
response = fileserverUploadHandler(fileserver_url, dataname, payload_bytes)
|
||||||
|
|
||||||
if response["status"] != 200 # Check if upload was successful
|
if response["status"] != 200 # Check if upload was successful
|
||||||
error("Failed to upload data to fileserver: $(response[:status])") # Throw error if upload failed
|
error("Failed to upload data to fileserver: $(response["status"])") # Throw error if upload failed
|
||||||
end
|
end
|
||||||
|
|
||||||
url = response[:url] # URL for the uploaded data
|
url = response["url"] # URL for the uploaded data
|
||||||
log_trace(cid, "Uploaded to URL: $url") # Log successful upload
|
log_trace(cid, "Uploaded to URL: $url") # Log successful upload
|
||||||
|
|
||||||
# Create msgPayload_v1 for link transport
|
# Create msgPayload_v1 for link transport
|
||||||
|
|||||||
Reference in New Issue
Block a user