Create Upload
Create an upload session and get a pre-signed upload URL. Upload the file bytes to the `uploadLocation`, then call the complete endpoint to finalize the file and receive a public URL.
## Example
```bash
curl --request POST \
--url https://api.glideapps.com/apps/$APP_ID/uploads \
--header "Authorization: Bearer $GLIDE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"contentType": "image/png",
"fileName": "logo.png"
}'
```
Response:
```json
{
"data": {
"uploadID": "upload-123",
"uploadLocation": "https://storage.googleapis.com/glide-uploads/example?X-Goog-Algorithm=GOOG4-RSA-SHA256"
}
}
```
Then upload the file bytes to `uploadLocation`:
```bash
curl --request PUT \
--url "$UPLOAD_LOCATION" \
--header "Content-Type: image/png" \
--upload-file ./logo.png
```
Finally, complete the upload:
```bash
curl --request POST \
--url https://api.glideapps.com/apps/$APP_ID/uploads/$UPLOAD_ID/complete \
--header "Authorization: Bearer $GLIDE_API_KEY"
```
Note that Glide will delete this file within 30 days if the URL is not stored in a table in Glide.
Authentication
AuthorizationBearer
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path parameters
appID
Request
This endpoint expects an object.
contentType
MIME type of the file, e.g., image/png
fileName
Name of the file
Response
data
Errors
402
Payment Required Error
403
Forbidden Error
413
Content Too Large Error