Function useBytes

  • Returns the data of a Google Cloud Storage object

    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 UseBytesResult

    Data, loading state, and error

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