Function useStream

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

    This hook is only 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 UseStreamResult

    Data, loading state, and error

    • value: Object data as stream; 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