Prepare Verified Upload
curl --request POST \
--url https://api.zerodrive.dev/v1/uploads/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"drive_id": "primary",
"expected_revision": 123,
"content_type": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
path: '<string>',
drive_id: 'primary',
expected_revision: 123,
content_type: '<string>'
})
};
fetch('https://api.zerodrive.dev/v1/uploads/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/uploads/prepare"
payload = {
"path": "<string>",
"drive_id": "primary",
"expected_revision": 123,
"content_type": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Prepare Verified Upload
Prepare a staged upload session returning upload_id, signed upload_url, and expiration.
POST
https://api.zerodrive.dev
/
v1
/
uploads
/
prepare
Prepare Verified Upload
curl --request POST \
--url https://api.zerodrive.dev/v1/uploads/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"drive_id": "primary",
"expected_revision": 123,
"content_type": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
path: '<string>',
drive_id: 'primary',
expected_revision: 123,
content_type: '<string>'
})
};
fetch('https://api.zerodrive.dev/v1/uploads/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/uploads/prepare"
payload = {
"path": "<string>",
"drive_id": "primary",
"expected_revision": 123,
"content_type": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}
