Skip to content
Account

REST

POST

Multipart/form-data request

METHOD: POST
https://api.defaultuploader.com/v1/upload
# multipart/form-data
# Requires header — authorization: SECRET_CLIENT_TOKEN

To upload files, you need to obtain a secret key in your Default Uploader dashboard and add the Authorization header to the request:

bash
curl --location 'https://api.defaultuploader.com/v1/upload' --header 'Authorization: YOUR_SECRET_CLIENT_TOKEN' --form 'file=@"/C:/path_to_file/file_example_JPG_100kB.jpg"'

You will receive the following response from the server:

JSON
[ // always returns a collection
{
"sourceName": "7uLbiXh7867H7dEPpsubV9.png", // unique file ID in the bucket
"src": "https://api.defaultuploader.com/v1/image/upload/azxwjk4PCkLTFbuUYiQZ1j/7uLbiXh7867H7dEPpsubV9.png", // file path through API
"originalSrc": "https://hb.vkcs.cloud/defaultuploader/image/png/7uLbiXh7867H7dEPpsubV9.png", // direct file path in the bucket
"originalName": "dark_theme.png", // original file name
"s3PathOriginal": "image/png/7uLbiXh7867H7dEPpsubV9.png", // original file path
"s3Path": "image/png/7uLbiXh7867H7dEPpsubV9.png", // derivative file path
"options": {}, // internal settings
"size": 1400308, // size in bytes
"mimeType": "image",
"format": "png"
}
]

PUT

Multipart/form-data request with a presigned URL

In this guide, you will learn how to obtain a presigned URL.

bash
https://api.defaultuploader.com/v1/upload/sign/7uLbiXh7867H7dEPpsubV9/5447114698657692x-params12d848eaca5282asdasda44766906ebx-token1427afc2d42ab2a200555c5d6b47a48b29cbffaac19cf572314ddafasddfd627ac0cdfabd6a134ggjhoda42728180a845e719ca0e0ce797ac/my-custom-folder.com?expirationIn=3600

GET

METHOD: GET
https://api.defaultuploader.com/v1/MIME_TYPE/upload/CLIENT_TOKEN/S3_PATH
v1 — API version
MIME_TYPE — media type (image, video, audio)
CLIENT_TOKEN — token from the dashboard
S3_PATH — file path in your S3 storage

A GET request returns a file with the following headers:

KeyValue
cache-controlpublic, max-age=604800
etagimage/png/7uLbiXh7867H7dEPpsubV9.png
accept-rangesbytes
content-length1400308
content-rangebytes 0 - 1400308
content-typeimage/png

DELETE

Deletes the original file and all derivative files.

METHOD: DELETE
https://api.defaultuploader.com/v1/upload/S3_PATH_ORIGINAL
# Requires header — authorization: SECRET_CLIENT_TOKEN