Function useBlob

  • Returns the data of a Google Cloud Storage object as a Blob

    This hook is not available in Node

    Parameters

    • reference: undefined | null | StorageReference

      Reference to a Google Cloud Storage object

    • OptionalmaxDownloadSizeBytes: number

      If set, the maximum allowed size in bytes to retrieve

    Returns UseBlobResult

    Data, loading state, and error

    • value: Object data as a Blob; undefined if data of the object is currently being downloaded, or an error occurred
    • loading: true while downloading the data of the object; false if the data was downloaded successfully or an error occurred
    • error: undefined if no error occurred