File Upload Guide
File uploads use presigned URLs, which allow you to securely upload files directly to storage without passing them through our servers. The process consists of two steps:
-
Request a presigned URL
Before uploading a file, you must request a temporary presigned URL from the API. This URL allows direct file uploads to the storage service.
-
Upload the File Using the Presigned URL
Once you have the presigned URL, upload the file using a PUT request.
⚠️ Note: The presigned URL is time-limited and will expire if not used promptly.
-
Register the File in magicplan
After the file has been uploaded, you must register it with the project to complete the process.
Supported File TypesCopied!
The API supports the following file types:
-
📄 Documents:
pdf
,doc
,docx
,xls
,xlsx
,ppt
,pptx
,csv
-
🖼️ Images:
jpeg
,jpg
,png
,gif
,bmp
,svg
,webp
-
🛠️ 3D Models:
usdz
Common Issues & TroubleshootingCopied!
Why is my presigned URL request failing?
-
Ensure the project ID is valid and you have the right permissions.
-
Verify that
acting_user
is a valid email associated with your workspace.
Why is my file upload failing?
-
Ensure you’re using the correct HTTP method (
PUT
). -
Use the exact headers returned in the presigned URL response.
-
Upload the file before the presigned URL expires.
Why is my file not appearing in magicplan?
-
You must register the file using
/projects/{id}/files
after uploading.