curl --request PUT \
--url https://storage.bunnycdn.com/{storageZoneName}/{path}/{fileName} \
--header 'AccessKey: <api-key>' \
--header 'Content-Type: application/octet-stream' \
--data '"<string>"'Upload a file to a storage zone based on the URL path. If the directory tree does not exist, it will be created automatically. The file content should be sent as the body of the request without any type of encoding.
curl --request PUT \
--url https://storage.bunnycdn.com/{storageZoneName}/{path}/{fileName} \
--header 'AccessKey: <api-key>' \
--header 'Content-Type: application/octet-stream' \
--data '"<string>"'The storage zone password also doubles as your API key. You can find it in your storage zone details page in the bunny.net dashboard.
The SHA256 checksum of the uploaded content. The server will compare the final SHA256 to the checksum and reject the request in case the checksums do not match.
The API AccessKey used for authentication.
he name of your storage zone where you are connecting to.
The directory path to where your file will be stored. If this is the root of your storage zone, you can ignore this parameter.
The name that the file will be uploaded as.
Raw request body should contain the contents of the file. This should be raw file data without any sort of encoding.
The body is of type file.
The file upload was successful.
Was this page helpful?