For files you’re happy to send through the API, a single multipart
POST /api/v1/upload is simpler — see Upload Media.
The two-step flow below is for large files and browser uploads.Step 1: Generate a Presigned URL
Make aPOST request to /api/v1/upload/presign with the details of the file
you intend to upload (size, mime-type, and where it should land).
The destination is named exactly the same way as a direct upload: a folder
path, a full key, or a folderId. Missing folders are created for you — see
Folders & Paths.
uploadUrl and a tracking id.
contentHash that matches content Dreep already stores, the
response comes back with "alreadyExists": true and no uploadUrl — skip
Step 2 and go straight to Step 3.
Step 2: PUT the file to the Upload URL
Take theuploadUrl returned from Step 1, and make an HTTP PUT request directly to it containing the raw file binary.
Crucial requirements for Step 2:
- The HTTP method MUST be
PUT(notPOST). - The
Content-Typeheader MUST exactly match themimeTypeyou provided in Step 1. - The
Content-Lengthheader MUST exactly match thesizeBytesyou provided in Step 1.
Step 3: Confirm the upload
Once thePUT succeeds, call the confirm endpoint with the id from Step 1.
Dreep verifies the object landed, reads its metadata, applies any transform,
and marks the asset ready. Until you do this the asset stays pending and is
excluded from media listings.
Uploading to Secure Folders
By default, uploads go to your project’s default public folder. To upload an asset into a Private or Signed folder, name that folder in Step 1 — byfolder path or by folderId.
Folders created on the fly by a path inherit their parent’s access control, so uploading to invoices/2024/q1 under a Private invoices folder keeps the new subfolders private. See Folders & Paths.
If you upload into a Signed folder, you can optionally provide expiresInSeconds during Step 1 to override the folder’s default expiration just for this specific asset.
Supported File Formats
Dreep supports direct uploads up to 500MB per file. Uploaded files are categorized into three asset kinds:Format Conversion Rules
When requesting format conversions during upload or delivery (via theformat parameter), Dreep strictly enforces media family boundaries:
- Image → Image: Images can be converted to
jpeg,png,webp,avif,gif, ortiff. - Video → Video: Videos can be converted to
mp4,webm,mov,hls(.m3u8), orgif(animated GIF clip). - Cross-Family Restrictions: Converting an Image to a Video format (or Video to an Image format other than
gif) is blocked and returns anUnsupported format conversionerror. - Raw Files: Non-transformable raw files (PDF, DOCX, ZIP) cannot be converted to any target format.