Skip to main content

Static storage

Overview#

Architect gives you your own storage space for storing files of all types and sizes.
There are available two endpoints on your project API for managing files, /files and /files/bulk.

Currently, it's possible do upload only as an authorized user, so be sure that you include authorization headers.

Uploading a file#

POST https://{app-id}.essentialz.cloud/files

To upload a single file, just send a request with multipart form data containing your file.

Request
curl --location --request POST 'https://{app-id}.essentialz.cloud/files' \
--header 'Authorization: Bearer eyJhbGciOi...' \
--form 'file=@"/path/to/the/file/image.png"'
Response
{
"url": "https://s3.amazonaws.com/architect.bucket/{app-id}/upload_6b2ac5..."
}

Uploading files in bulk#

POST https://{app-id}.essentialz.cloud/files/bulk

Uploading files in bulk works in a similar way as uploading a single file.

Request
curl --location --request POST 'https://{app-id}.essentialz.cloud/files/bulk' \
--header 'Authorization: Bearer eyJhbGciOi...' \
--form 'files[]=@"/path/to/the/files/image1.png"' \
--form 'files[]=@"/path/to/the/files/image2.png"'
Response
[
{
"url": "https://s3.amazonaws.com/architect.bucket/{app-id}/upload_54394c..."
},
{
"url": "https://s3.amazonaws.com/architect.bucket/{app-id}/upload_892c97..."
}
]