getFileView method
Get File for View
Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.
Implementation
Future<Uint8List> getFileView(
{required String bucketId, required String fileId}) async {
final String path = '/storage/buckets/{bucketId}/files/{fileId}/view'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
final Map<String, dynamic> params = {
'project': client.config['project'],
};
final res = await client.call(HttpMethod.get,
path: path, params: params, responseType: ResponseType.bytes);
return res.data;
}