Function useMetadata

  • Returns the metadata of a Google Cloud Storage object

    Parameters

    • reference: undefined | null | StorageReference

      Reference to a Google Cloud Storage object

    Returns UseMetadataResult

    Metadata, loading state, and error

    • value: Metadata; undefined if metadata is currently being fetched, or an error occurred
    • loading: true while fetching the metadata; false if the metadata was fetched successfully or an error occurred
    • error: undefined if no error occurred