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


params required StorageDownloadFileParams

PropertyTypeRequiredNotes
params.fileIdstring✔️
params.blurnumberImage blur, between 0 and 100
params.qualitynumberImage quality, between 1 and 100, 100 being the best quality
params.heightnumberImage height, in pixels
params.widthnumberImage width, in pixels
params.headersRecord<string, string>Optional headers to be sent with the request