Generate Upload URL

Get a presigned URL for direct file upload

POSThttps://api.jamdesk.com/api/v1/files/upload-url

Generates a presigned URL for uploading large files directly to storage, bypassing the API server.

Request Body

filenamestringrequired

Name of the file.

contentTypestringrequired

MIME type of the file.

sizeintegerrequired

File 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"
  }
}