Skip to main content

Overview

MechZie uses S3-compatible presigned URLs for file uploads. Files are uploaded directly from the client to S3 — they never pass through the API server. This keeps uploads fast and reduces server load.

Upload Flow

Step-by-Step

1

Request a presigned URL

Response (200):
2

Upload the file directly to S3

The Content-Type header in the PUT request must match the contentType you sent when requesting the presigned URL. Mismatches will cause a 403 from S3.
3

Use the fileUrl in API calls

Pass the returned fileUrl to any endpoint that accepts file URLs:

Allowed File Types

Other content types will be rejected with a 422 VALIDATION_ERROR. Always validate the file type client-side before requesting a presigned URL.

Where File URLs Are Used

Mechanic Document Types

When submitting mechanic registration documents, use these type values:

Dart Helper

Presigned URLs expire in 15 minutes (900 seconds). If the upload is not completed within this time, request a new URL. The fileUrl remains valid permanently after a successful upload.