# Step 1: Get presigned URL
curl -X POST https://app.drime.cloud/api/v1/s3/simple/presign \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filename": "document.pdf",
"mime": "application/pdf",
"size": 87965,
"extension": "pdf",
"workspaceId": 0
}'
# Step 2: Upload to presigned URL
curl -X PUT "PRESIGNED_URL" \
-H "Content-Type: application/pdf" \
--data-binary @document.pdf
// Step 1: Get presigned URL
const presignResponse = await fetch('https://app.drime.cloud/api/v1/s3/simple/presign', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filename: file.name,
mime: file.type,
size: file.size,
extension: file.name.split('.').pop(),
workspaceId: 0
})
});
const { url, key } = await presignResponse.json();
// Step 2: Upload to presigned URL
await fetch(url, {
method: 'PUT',
headers: {
'Content-Type': file.type
},
body: file
});
// Step 3: Create file entry (see /s3/entries endpoint)
import requests
# Step 1: Get presigned URL
presign_response = requests.post(
'https://app.drime.cloud/api/v1/s3/simple/presign',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'filename': 'document.pdf',
'mime': 'application/pdf',
'size': 87965,
'extension': 'pdf',
'workspaceId': 0
}
)
data = presign_response.json()
presigned_url = data['url']
key = data['key']
# Step 2: Upload to presigned URL
with open('document.pdf', 'rb') as f:
requests.put(
presigned_url,
headers={'Content-Type': 'application/pdf'},
data=f
)
# Step 3: Create file entry (see /s3/entries endpoint)
{
"url": "https://drimestorage.xxx.r2.cloudflarestorage.com/uploads/71ea55f2.../71ea55f2...?X-Amz-Algorithm=AWS4-HMAC-SHA256&...",
"key": "uploads/71ea55f2-1ba7-46ad-98b7-db487ecac2f6/71ea55f2-1ba7-46ad-98b7-db487ecac2f6",
"acl": "private",
"status": "success"
}
Uploads
Get Presigned URL
Get a presigned URL for direct S3 upload
POST
/
s3
/
simple
/
presign
# Step 1: Get presigned URL
curl -X POST https://app.drime.cloud/api/v1/s3/simple/presign \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filename": "document.pdf",
"mime": "application/pdf",
"size": 87965,
"extension": "pdf",
"workspaceId": 0
}'
# Step 2: Upload to presigned URL
curl -X PUT "PRESIGNED_URL" \
-H "Content-Type: application/pdf" \
--data-binary @document.pdf
// Step 1: Get presigned URL
const presignResponse = await fetch('https://app.drime.cloud/api/v1/s3/simple/presign', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filename: file.name,
mime: file.type,
size: file.size,
extension: file.name.split('.').pop(),
workspaceId: 0
})
});
const { url, key } = await presignResponse.json();
// Step 2: Upload to presigned URL
await fetch(url, {
method: 'PUT',
headers: {
'Content-Type': file.type
},
body: file
});
// Step 3: Create file entry (see /s3/entries endpoint)
import requests
# Step 1: Get presigned URL
presign_response = requests.post(
'https://app.drime.cloud/api/v1/s3/simple/presign',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'filename': 'document.pdf',
'mime': 'application/pdf',
'size': 87965,
'extension': 'pdf',
'workspaceId': 0
}
)
data = presign_response.json()
presigned_url = data['url']
key = data['key']
# Step 2: Upload to presigned URL
with open('document.pdf', 'rb') as f:
requests.put(
presigned_url,
headers={'Content-Type': 'application/pdf'},
data=f
)
# Step 3: Create file entry (see /s3/entries endpoint)
{
"url": "https://drimestorage.xxx.r2.cloudflarestorage.com/uploads/71ea55f2.../71ea55f2...?X-Amz-Algorithm=AWS4-HMAC-SHA256&...",
"key": "uploads/71ea55f2-1ba7-46ad-98b7-db487ecac2f6/71ea55f2-1ba7-46ad-98b7-db487ecac2f6",
"acl": "private",
"status": "success"
}
Overview
Gets a presigned URL for uploading files smaller than 5MB directly to S3/R2 storage. This is more efficient than the direct upload endpoint. Upload Flow:- Call this endpoint to get a presigned URL
- PUT your file to the presigned URL
- Call
/s3/entriesto register the file in Drime
For files ≥ 5MB, use the multipart upload flow instead.
Request Body
string
required
Original filename
string
required
MIME type of the file
integer
required
File size in bytes
string
required
File extension without dot
integer
Workspace ID. Use
0 for personal workspace.string
Folder path for auto-creation
integer
Parent folder ID
Response
string
Presigned URL for PUT upload (valid for 1 hour)
string
S3 key (format:
uploads/{uuid}/{uuid})string
Access control (
private)string
Request status (
success)# Step 1: Get presigned URL
curl -X POST https://app.drime.cloud/api/v1/s3/simple/presign \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filename": "document.pdf",
"mime": "application/pdf",
"size": 87965,
"extension": "pdf",
"workspaceId": 0
}'
# Step 2: Upload to presigned URL
curl -X PUT "PRESIGNED_URL" \
-H "Content-Type: application/pdf" \
--data-binary @document.pdf
// Step 1: Get presigned URL
const presignResponse = await fetch('https://app.drime.cloud/api/v1/s3/simple/presign', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filename: file.name,
mime: file.type,
size: file.size,
extension: file.name.split('.').pop(),
workspaceId: 0
})
});
const { url, key } = await presignResponse.json();
// Step 2: Upload to presigned URL
await fetch(url, {
method: 'PUT',
headers: {
'Content-Type': file.type
},
body: file
});
// Step 3: Create file entry (see /s3/entries endpoint)
import requests
# Step 1: Get presigned URL
presign_response = requests.post(
'https://app.drime.cloud/api/v1/s3/simple/presign',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'filename': 'document.pdf',
'mime': 'application/pdf',
'size': 87965,
'extension': 'pdf',
'workspaceId': 0
}
)
data = presign_response.json()
presigned_url = data['url']
key = data['key']
# Step 2: Upload to presigned URL
with open('document.pdf', 'rb') as f:
requests.put(
presigned_url,
headers={'Content-Type': 'application/pdf'},
data=f
)
# Step 3: Create file entry (see /s3/entries endpoint)
{
"url": "https://drimestorage.xxx.r2.cloudflarestorage.com/uploads/71ea55f2.../71ea55f2...?X-Amz-Algorithm=AWS4-HMAC-SHA256&...",
"key": "uploads/71ea55f2-1ba7-46ad-98b7-db487ecac2f6/71ea55f2-1ba7-46ad-98b7-db487ecac2f6",
"acl": "private",
"status": "success"
}
⌘I

