https://api.ub.bitbros.in
Upload a file
Send aPOST request with a multipart/form-data body containing the file.
Endpoint: POST /api/storage/upload
Do not set the
Content-Type header manually. When you pass a FormData object, the browser sets the correct multipart/form-data boundary automatically. Setting it yourself will break the upload.| Field | Description |
|---|---|
url | Publicly accessible CDN URL for the file |
path | Storage path — save this to delete the file later |
provider | The underlying storage provider used |
Delete a file
To delete a file, pass thepath returned from the upload response.
Endpoint: DELETE /api/storage/file
404.
Limits
| Limit | Value |
|---|---|
| Maximum file size | 10 MB per file |
| Total storage per project | 100 MB (default plan) |
Troubleshooting
400 Bad Request
400 Bad Request
The
file field is missing from the multipart form body. Make sure you are appending the file to a FormData object with the key file before sending.401 Unauthorized
401 Unauthorized
413 Payload Too Large
413 Payload Too Large
The file exceeds the 10 MB per-file limit. Compress or resize the file before uploading.
