curl -X POST https://app.drime.cloud/api/v1/s3/multipart/create \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filename": "large-video.mp4",
"mime": "video/mp4",
"size": 142557981,
"extension": "mp4",
"workspaceId": 0
}'
const response = await fetch('https://app.drime.cloud/api/v1/s3/multipart/create', {
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 { key, uploadId } = await response.json();
// Store these for subsequent operations
console.log(`Upload initialized: ${uploadId}`);
import requests
response = requests.post(
'https://app.drime.cloud/api/v1/s3/multipart/create',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'filename': 'large-video.mp4',
'mime': 'video/mp4',
'size': 142557981,
'extension': 'mp4',
'workspaceId': 0
}
)
data = response.json()
key = data['key']
upload_id = data['uploadId']
print(f'Upload initialized: {upload_id}')
{
"key": "uploads/1e4cbca8-165f-4780-9cb7-fc4d8f2e4834/1e4cbca8-165f-4780-9cb7-fc4d8f2e4834",
"uploadId": "AFNhWKh6Cn6fOryIGSCF4GFVTXB1CnOpdipc0ZHJIHwk9YBgHjLXwXhQkzQ4LmXVkW46cl1ICuQFI4KPBWXt...",
"acl": "private",
"status": "success"
}
Multipart Uploads
Create Multipart Upload
Initialize a multipart upload for large files
POST
/
s3
/
multipart
/
create
curl -X POST https://app.drime.cloud/api/v1/s3/multipart/create \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filename": "large-video.mp4",
"mime": "video/mp4",
"size": 142557981,
"extension": "mp4",
"workspaceId": 0
}'
const response = await fetch('https://app.drime.cloud/api/v1/s3/multipart/create', {
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 { key, uploadId } = await response.json();
// Store these for subsequent operations
console.log(`Upload initialized: ${uploadId}`);
import requests
response = requests.post(
'https://app.drime.cloud/api/v1/s3/multipart/create',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'filename': 'large-video.mp4',
'mime': 'video/mp4',
'size': 142557981,
'extension': 'mp4',
'workspaceId': 0
}
)
data = response.json()
key = data['key']
upload_id = data['uploadId']
print(f'Upload initialized: {upload_id}')
{
"key": "uploads/1e4cbca8-165f-4780-9cb7-fc4d8f2e4834/1e4cbca8-165f-4780-9cb7-fc4d8f2e4834",
"uploadId": "AFNhWKh6Cn6fOryIGSCF4GFVTXB1CnOpdipc0ZHJIHwk9YBgHjLXwXhQkzQ4LmXVkW46cl1ICuQFI4KPBWXt...",
"acl": "private",
"status": "success"
}
Overview
Initiates a multipart upload for files ≥ 5MB (5,242,880 bytes). Returns anuploadId and key that must be used for all subsequent operations.
Multipart Upload Flow:
- Create - Initialize the upload (this endpoint)
- Sign - Get presigned URLs for each part
- Upload - PUT each part to its URL
- Complete - Finalize the upload
- Register - Create file entry with
/s3/entries
Request Body
string
required
Original filename
string
required
MIME type
integer
required
File size in bytes
string
required
File extension without dot
integer
Workspace ID
string
Folder path for auto-creation
integer
Parent folder ID
Response
string
S3 key for the upload
string
Multipart upload ID (required for all subsequent operations)
string
Access control (
private)string
Request status (
success)curl -X POST https://app.drime.cloud/api/v1/s3/multipart/create \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filename": "large-video.mp4",
"mime": "video/mp4",
"size": 142557981,
"extension": "mp4",
"workspaceId": 0
}'
const response = await fetch('https://app.drime.cloud/api/v1/s3/multipart/create', {
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 { key, uploadId } = await response.json();
// Store these for subsequent operations
console.log(`Upload initialized: ${uploadId}`);
import requests
response = requests.post(
'https://app.drime.cloud/api/v1/s3/multipart/create',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'filename': 'large-video.mp4',
'mime': 'video/mp4',
'size': 142557981,
'extension': 'mp4',
'workspaceId': 0
}
)
data = response.json()
key = data['key']
upload_id = data['uploadId']
print(f'Upload initialized: {upload_id}')
{
"key": "uploads/1e4cbca8-165f-4780-9cb7-fc4d8f2e4834/1e4cbca8-165f-4780-9cb7-fc4d8f2e4834",
"uploadId": "AFNhWKh6Cn6fOryIGSCF4GFVTXB1CnOpdipc0ZHJIHwk9YBgHjLXwXhQkzQ4LmXVkW46cl1ICuQFI4KPBWXt...",
"acl": "private",
"status": "success"
}
Each part should be ~5MB (5,242,880 bytes) except for the last part which may be smaller.