Generate Upload URL
Get a presigned URL for direct file upload
POST
Generates a presigned URL for uploading large files directly to storage, bypassing the API server.
Request Body
filenamestringrequiredName of the file.
contentTypestringrequiredMIME type of the file.
sizeintegerrequiredFile size in bytes.
curl -X POST "https://api.example.com/v1/files/upload-url" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filename": "large-video.mp4",
"contentType": "video/mp4",
"size": 104857600
}'{
"data": {
"uploadUrl": "https://storage.example.com/upload?signature=abc123...",
"fileId": "file_pending_123",
"expiresAt": "2024-01-15T11:30:00Z"
}
}