Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Complete Upload
openapi: post /apps/{appID}/uploads/{uploadID}/complete
---

Finalize an upload and receive the public URL for the file. Use the `uploadID` from the create upload response.

If the uploaded object is missing or incomplete, this endpoint returns a 409.

Note that Glide will delete this file within 30 days if the URL is not stored in a table in Glide.
50 changes: 50 additions & 0 deletions api-reference/v2/uploads/post-apiapps-uploads.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Create Upload
openapi: post /apps/{appID}/uploads
---

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",
"contentLength": 1024,
"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.
9 changes: 8 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
"api-reference/v2/jobs/get-job"
]
},
{
"group": "Uploads",
"pages": [
"api-reference/v2/uploads/post-apiapps-uploads",
"api-reference/v2/uploads/post-apiapps-uploads-uploadid-complete"
]
},
{
"group": "Tutorials",
"pages": [
Expand Down Expand Up @@ -87,4 +94,4 @@
"linkedin": "https://www.linkedin.com/company/glideapps/"
}
}
}
}
Loading