cURL
curl --request PUT "PASTE_COMPLETE_PRESIGNED_URL_HERE" \
--header "Content-Type: application/octet-stream" \
--data-binary "@sample.pdf"A valid request URL is required to generate request examplesA valid request URL is required to generate request examplesA valid request URL is required to generate request examplesA valid request URL is required to generate request examplesA valid request URL is required to generate request examplesA valid request URL is required to generate request examplesDocument, File & System
Upload File via Pre-signed URL (API Tester)
Paste the complete generated presignedUrl and upload a local file as raw bytes.
PUT
/
cURL
curl --request PUT "PASTE_COMPLETE_PRESIGNED_URL_HERE" \
--header "Content-Type: application/octet-stream" \
--data-binary "@sample.pdf"A valid request URL is required to generate request examplesA valid request URL is required to generate request examplesA valid request URL is required to generate request examplesA valid request URL is required to generate request examplesA valid request URL is required to generate request examplesA valid request URL is required to generate request examplesWhere is my uploaded file? This PUT normally returns HTTP 200 with an empty body and no file URL. To open, download, or process the file, use the
url returned by the first GET request. The presignedUrl pasted here is the upload destination, not the access link.Step 1: Generate a pre-signed URL with
contenttype=application/octet-stream. Save both returned links.- Paste the entire
presignedUrlinto the URL field, including its query string. Do not paste the accessurl, remove query parameters, decode values, or append a slash. - Select the file from your computer and send the PUT. This request sends raw file bytes with
Content-Type: application/octet-stream. Do not add your PDF.co API key. - HTTP 200 with an empty body means storage accepted the upload. Use the original access
urlfor subsequent PDF.co requests.
Body
application/octet-stream
The selected local file, sent as raw bytes rather than multipart form data or a file path.
The body is of type file.
Response
Storage accepted the upload. The response body is normally empty; no new access URL is returned.
Was this page helpful?