Data Types

BeginMultipartUpload

Begins a new multipart file upload process.

POST /v2/accounts/{accountId}/uploads
cURL
1curl https://api.upload.io/v2/accounts/{accountId}/uploads \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d @- << EOF
5 {
6 "metadata": {
7 "myCustomField1": true,
8 "myCustomField2": {
9 "hello": "world"
10 },
11 "anotherCustomField": 42
12 },
13 "mime": "image/jpeg",
14 "originalFileName": "example.jpg",
15 "path": {
16 "fileName": "image.jpg",
17 "fileNameVariablesEnabled": true,
18 "folderPath": "/uploads",
19 "folderPathVariablesEnabled": true
20 },
21 "protocol": "1.0",
22 "size": 43182,
23 "tags": [
24 "images/profile"
25 ]
26 }
27EOF
Response (200)
1{
2 "file": {
3 "accountId": "YOUR_ACCOUNT_ID",
4 "filePath": "/uploads/image.jpg",
5 "fileUrl": "https://upcdn.io/A623uY2/raw/uploads/image.jpg",
6 "lastModified": 1615680311115,
7 "metadata": {
8 "myCustomField1": true,
9 "myCustomField2": {
10 "hello": "world"
11 },
12 "anotherCustomField": 42
13 },
14 "mime": "image/jpeg",
15 "originalFileName": "example.jpg",
16 "size": 43182,
17 "tags": [
18 "images/profile"
19 ]
20 },
21 "uploadId": "Kd759aLFxttm69kZ",
22 "uploadParts": {
23 "count": 12,
24 "first": {
25 "range": {
26 "inclusiveEnd": 5242879,
27 "inclusiveStart": 0
28 },
29 "uploadId": "Kd759aLFxttm69kZ",
30 "uploadPartIndex": 7,
31 "uploadUrl": "https://...long-url...x-id=PutObject"
32 }
33 }
34}

Request Body

Response Body

URL Parameters

accountId

Your account ID.

This is visible on the settings page:

https://upload.io/dashboard/settings

Type: String

Length: 7

Example: A623uY2

In: Path

Required: Yes

Request Headers

Authorization

Add one of these Authorization header values to your request:

Option 1: prefix "Bearer " to your API key. The result is your Authorization header value.

Option 2: use HTTP basic authorization, specifying apikey as your username, and your API key as your password.

Type: String

In: Header

Required: Yes

Content-Type

This endpoints requires a JSON request body.

Type: String

Value: "application/json"

In: Header

Required: Yes

Was this section helpful? Yes No

You are using an outdated browser.

This website requires a modern web browser -- the latest versions of these browsers are supported: