Skip to main content
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
{
  "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:
  1. Call this endpoint to get a presigned URL
  2. PUT your file to the presigned URL
  3. Call /s3/entries to register the file in Drime
For files ≥ 5MB, use the multipart upload flow instead.

Request Body

filename
string
required
Original filename
mime
string
required
MIME type of the file
size
integer
required
File size in bytes
extension
string
required
File extension without dot
workspaceId
integer
Workspace ID. Use 0 for personal workspace.
relativePath
string
Folder path for auto-creation
parentId
integer
Parent folder ID

Response

url
string
Presigned URL for PUT upload (valid for 1 hour)
key
string
S3 key (format: uploads/{uuid}/{uuid})
acl
string
Access control (private)
status
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
{
  "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"
}