download()
Use nhost.storage.download to download a file. To download a file the user must have permission to select the file in the storage.files table.
const { file, error } = await nhost.storage.download({ fileId: '<File-ID>' })Parameters
Section titled “Parameters”params required StorageDownloadFileParams
| Property | Type | Required | Notes |
|---|---|---|---|
| params.fileId | string | ✔️ | |
| params.blur | number | Image blur, between 0 and 100 | |
| params.quality | number | Image quality, between 1 and 100, 100 being the best quality | |
| params.height | number | Image height, in pixels | |
| params.width | number | Image width, in pixels | |
| params.headers | Record<string, string> |