Authentication
All upload endpoints require authentication via tRPC context. The user must be logged in.Simple Upload
requestUploadUrl
Request a presigned URL for direct file upload.string
required
Name of the file being uploaded
string
required
MIME type of the file (e.g.,
image/jpeg, video/mp4)number
required
File size in bytes
confirmUpload
Mark a file as successfully uploaded.string
required
File record ID from
requestUploadUrlMultipart Upload
For files larger than 10MB, use multipart upload for resumability.initiateMultipart
Start a new multipart upload.string
required
Name of the file
string
required
MIME type of the file
number
required
Total file size in bytes
number
required
Number of parts the file will be split into
getPartUrl
Get presigned URL for uploading a specific part.string
required
File record ID
number
required
Part number (1-indexed)
completePart
Record that a part has been uploaded successfully.string
required
File record ID
number
required
Part number that was uploaded
string
required
ETag returned from S3 after uploading the part
completeMultipart
Finalize the multipart upload after all parts are uploaded.string
required
File record ID
abortMultipart
Cancel a multipart upload and clean up parts.string
required
File record ID
Error Codes
Allowed MIME Types
ALLOWED_MIME_TYPES in apps/api/src/routers/upload.ts.
Size Limits
Test Checklist
requestUploadUrlreturns a presigned URL- Upload succeeds and
confirmUploadmarks the file as uploaded - Multipart uploads complete successfully
Troubleshooting
If you seeBAD_REQUEST or QUOTA_EXCEEDED, confirm allowed MIME types and
storage quota configuration.
Remove / Disable
To disable uploads while you configure S3, set:apps/mobile/features/feature-registry.tsx → featureFlags.fileUploads = false
For production removal guidance, see Removing Features.