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": "text/plain",
14 "originalFileName": "example.txt",
15 "path": {
16 "fileName": "example-{UNIQUE_DIGITS_4}{ORIGINAL_FILE_EXT}",
17 "folderPath": "/uploads"
18 },
19 "protocol": "1.0",
20 "size": 43182,
21 "tags": [
22 "example_tag"
23 ]
24 }
25EOF
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 "example_tag"
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

Example: A623uY2

Type: String

Length: 7

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: