GuideLab API

Get presigned upload URL

Generates a presigned PUT URL so the client can upload directly to storage. No file DB row is created until the client calls finalize after a successful upload. Optionally returns a second signed PUT URL for a thumbnail. Valid for 5 minutes.

POST
/files/presign

Generates a presigned PUT URL so the client can upload directly to storage. No file DB row is created until the client calls finalize after a successful upload. Optionally returns a second signed PUT URL for a thumbnail. Valid for 5 minutes.

Authorization

__Secure-guidelab-prod.session_token<token>

Production session cookie set for the guidelab.co domain by Better Auth

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/files/presign" \  -H "Content-Type: application/json" \  -d '{    "filename": "string",    "size": 1  }'
{  "fileId": "string",  "uploadUrl": "string",  "uploadContentType": "string",  "thumbnailUploadUrl": "string",  "thumbnailUploadContentType": "string",  "finalizeToken": "string"}
Empty
Empty
Empty
Empty