Storage

Store and serve user-generated content, such as photos, videos or documents.

Nhost Storage is a service to app and user generated files. It could be managing users uploading PDF documents or images for example.

All files are protected with storage rules to handle user permissions for the files.

Access token

To access a file you must provide a token (access token) to the file. The access token gets appended in the end of the url. Like this:

https://storage.nhost.io/profile_image.png?token=08d65be6-9950-49c8-bcdf-097135b0f9a2

The link does not work, it's just an example.

There are two ways to get the access token of a file.

  1. Upload

  2. Request the token

Uploading

When a user uploads a file the response body will contain the access token. This access token could be saved in the database, together with the file, to access the file later.

Request the token

The token can also be requested if the user has the correct permissions (defined in storage rules).

The token is a randomly generated file and is concidern non

Get started

‚Äč