Skip to content

Commit bf52306

Browse files
authored
Merge pull request #78 from glideapps/file-upload-without-content-length
File upload: Remove `contentLength`
2 parents 770593c + 0d6180b commit bf52306

File tree

3 files changed

+72
-9
lines changed

3 files changed

+72
-9
lines changed

api-reference/v2/uploads/post-apiapps-uploads-uploadid-complete.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ openapi: post /apps/{appID}/uploads/{uploadID}/complete
55

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

8-
If the uploaded object is missing or incomplete, this endpoint returns a 409.
8+
## Error Responses
9+
10+
| Status | Description |
11+
|--------|-------------|
12+
| 402 | Upload quota exceeded. The file has been deleted. |
13+
| 409 | Upload incomplete. The file bytes were not fully uploaded to the `uploadLocation`. |
14+
| 413 | File too large. The uploaded file exceeds the maximum allowed size. The file has been deleted. |
915

1016
Note that Glide will delete this file within 30 days if the URL is not stored in a table in Glide.

api-reference/v2/uploads/post-apiapps-uploads.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ curl --request POST \
1414
--header "Content-Type: application/json" \
1515
--data '{
1616
"contentType": "image/png",
17-
"contentLength": 1024,
1817
"fileName": "logo.png"
1918
}'
2019
```

openapi/swagger.json

Lines changed: 65 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2984,11 +2984,6 @@
29842984
"description": "MIME type of the file, e.g., `image/png`",
29852985
"example": "image/png"
29862986
},
2987-
"contentLength": {
2988-
"type": "number",
2989-
"description": "File size in bytes",
2990-
"example": 1024
2991-
},
29922987
"fileName": {
29932988
"type": "string",
29942989
"description": "Name of the file",
@@ -2997,7 +2992,6 @@
29972992
},
29982993
"required": [
29992994
"contentType",
3000-
"contentLength",
30012995
"fileName"
30022996
],
30032997
"additionalProperties": false
@@ -3040,6 +3034,38 @@
30403034
}
30413035
}
30423036
},
3037+
"402": {
3038+
"description": "Upload quota exceeded",
3039+
"content": {
3040+
"application/json": {
3041+
"schema": {
3042+
"type": "object",
3043+
"properties": {
3044+
"error": {
3045+
"type": "object",
3046+
"properties": {
3047+
"type": {
3048+
"type": "string"
3049+
},
3050+
"message": {
3051+
"type": "string"
3052+
}
3053+
},
3054+
"required": [
3055+
"type",
3056+
"message"
3057+
],
3058+
"additionalProperties": false
3059+
}
3060+
},
3061+
"required": [
3062+
"error"
3063+
],
3064+
"additionalProperties": false
3065+
}
3066+
}
3067+
}
3068+
},
30433069
"403": {
30443070
"description": "",
30453071
"content": {
@@ -3105,7 +3131,39 @@
31053131
}
31063132
},
31073133
"409": {
3108-
"description": "",
3134+
"description": "Upload incomplete",
3135+
"content": {
3136+
"application/json": {
3137+
"schema": {
3138+
"type": "object",
3139+
"properties": {
3140+
"error": {
3141+
"type": "object",
3142+
"properties": {
3143+
"type": {
3144+
"type": "string"
3145+
},
3146+
"message": {
3147+
"type": "string"
3148+
}
3149+
},
3150+
"required": [
3151+
"type",
3152+
"message"
3153+
],
3154+
"additionalProperties": false
3155+
}
3156+
},
3157+
"required": [
3158+
"error"
3159+
],
3160+
"additionalProperties": false
3161+
}
3162+
}
3163+
}
3164+
},
3165+
"413": {
3166+
"description": "File too large",
31093167
"content": {
31103168
"application/json": {
31113169
"schema": {

0 commit comments

Comments
 (0)