curl --request PUT \
--url https://api.prd.realitydefender.xyz/api/files/{requestId} \
--header 'Content-Type: application/octet-stream' \
--data '<string>'import requests
url = "https://api.prd.realitydefender.xyz/api/files/{requestId}"
payload = "<string>"
headers = {"Content-Type": "application/octet-stream"}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://api.prd.realitydefender.xyz/api/files/{requestId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.prd.realitydefender.xyz/api/files/{requestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Content-Type: application/octet-stream"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.prd.realitydefender.xyz/api/files/{requestId}"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.prd.realitydefender.xyz/api/files/{requestId}")
.header("Content-Type", "application/octet-stream")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prd.realitydefender.xyz/api/files/{requestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/octet-stream'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"requestId": "8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"bucket": "<bucket>",
"key": "3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b/8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e/8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e.mp4",
"versionId": "<version-id>"
}{
"statusCode": 400,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 401,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 415,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 123,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}Upload the file to the signed URL
Step 2 of 2 of the file upload flow. PUT the file to the signedUrl
returned by POST /api/files/aws-presigned, exactly as returned: it
already carries the requestId and the token query parameter.
No X-API-KEY header is needed; the token authorizes the upload.
Send only the raw file bytes as the body. Send a non-form
Content-Type (for example application/octet-stream or the file’s
MIME type), or none. multipart/*, application/x-www-form-urlencoded
and application/json are rejected with 415.
With curl, use curl -T your-file.mp4 '<signedUrl>', or
curl -X PUT -H 'Content-Type: application/octet-stream' --data-binary '@your-file.mp4' '<signedUrl>'.
Quote the URL. Plain --data-binary without a Content-Type header
sends application/x-www-form-urlencoded and is rejected.
curl --request PUT \
--url https://api.prd.realitydefender.xyz/api/files/{requestId} \
--header 'Content-Type: application/octet-stream' \
--data '<string>'import requests
url = "https://api.prd.realitydefender.xyz/api/files/{requestId}"
payload = "<string>"
headers = {"Content-Type": "application/octet-stream"}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://api.prd.realitydefender.xyz/api/files/{requestId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.prd.realitydefender.xyz/api/files/{requestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Content-Type: application/octet-stream"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.prd.realitydefender.xyz/api/files/{requestId}"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.prd.realitydefender.xyz/api/files/{requestId}")
.header("Content-Type", "application/octet-stream")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prd.realitydefender.xyz/api/files/{requestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/octet-stream'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"requestId": "8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"bucket": "<bucket>",
"key": "3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b/8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e/8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e.mp4",
"versionId": "<version-id>"
}{
"statusCode": 400,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 401,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 415,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 123,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}Query Parameters
Body
The body is of type file.