Begins a new multipart file upload process.
1curl "https://api.bytescale.com/v2/accounts/{accountId}/uploads" \2 -H "Authorization: Bearer YOUR_API_KEY" \3 -H "Content-Type: application/json" \4 -d @- << EOF5 {6 "metadata": {7 "myCustomField1": true,8 "myCustomField2": {9 "hello": "world"10 },11 "anotherCustomField": 4212 },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
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": 4213 },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": 028 },29 "uploadId": "Kd759aLFxttm69kZ",30 "uploadPartIndex": 7,31 "uploadUrl": "https://...long-url...x-id=PutObject"32 }33 }34}
Your account ID.
This is visible on the settings page:
https://www.bytescale.com/dashboard/settings
Example: A623uY2
Type: String
Length: 7
In: Path
Required: Yes
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
This endpoints requires a JSON request body.
Type: String
Value: "application/json"
In: Header
Required: Yes
This website uses cookies. By continuing you are consenting to the use of cookies per our cookie policy.
This website requires a modern web browser -- the latest versions of these browsers are supported: