RefirebaseRefirebase

getBlob

Get a file as a Blob.

Usage

Useful for displaying images locally or downloading files in the browser. Throws an error if it fails.

Example
import { db } from 'refirebase';

const blob = await db.storage.getBlob('images/photo.png');
const objectUrl = URL.createObjectURL(blob);

Parameters

ParamTypeDescription
filePath*stringThe path to the file in Storage.

Return value

Returns

Promise<Blob>

A promise that resolves to the Blob.