Skip to main content
Dreep uses a highly efficient, two-step upload process that allows your users (or your backend) to upload files directly to the underlying Dreep storage edge. This completely bypasses the primary Dreep API server, preventing bottlenecks and eliminating strict file-size limits on the API layer.
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 a POST 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.
The API will return an uploadUrl and a tracking id.
If you send a 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 the uploadUrl returned from Step 1, and make an HTTP PUT request directly to it containing the raw file binary. Crucial requirements for Step 2:
  1. The HTTP method MUST be PUT (not POST).
  2. The Content-Type header MUST exactly match the mimeType you provided in Step 1.
  3. The Content-Length header MUST exactly match the sizeBytes you provided in Step 1.

Step 3: Confirm the upload

Once the PUT 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 — by folder 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 the format parameter), Dreep strictly enforces media family boundaries:
  • Image → Image: Images can be converted to jpeg, png, webp, avif, gif, or tiff.
  • Video → Video: Videos can be converted to mp4, webm, mov, hls (.m3u8), or gif (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 an Unsupported format conversion error.
  • Raw Files: Non-transformable raw files (PDF, DOCX, ZIP) cannot be converted to any target format.