POST
/
files
/
curl --request POST \
  --url https://local.storage.nhost.run/v1/files/ \
  --header 'Authorization: <authorization>'	 \
  --header 'Content-Type: multipart/form-data' \
  --form 'file[]=@path-to-file'
{
  "ProcessedFiles": [
    {
      "id": "<string>",
      "name": "<string>",
      "size": 123,
      "bucketId": "<string>",
      "eTag": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "isUploaded": true,
      "mimeType": "<string>",
      "uploadedByUserId": "<string>",
      "metadata": {}
    }
  ]
}
curl --request POST \
  --url https://local.storage.nhost.run/v1/files/ \
  --header 'Authorization: <authorization>'	 \
  --header 'Content-Type: multipart/form-data' \
  --form 'file[]=@path-to-file'

Authorizations

Authorization
string
headerrequired

JSON Web Token to authorize requests.

Body

multipart/form-data
bucket-id
string

Bucket to upload the files to

metadata[]
object[]

(Optional) Set the following metadata for the uploaded files instead of letting the server do it automatically. See "UploadFileMetadata".

file[]
string[]

Array of files to upload.

Response

201 - application/json
ProcessedFiles
object[]