Firebase.Storage.StorageMetadata

Metadata for aStorageReference Metadata stores default attributes such as size and content type.

Summary

You may also store custom metadata key value pairs. Metadata values may be used to authorize operations using declarative validation rules. This class is readonly. To create or change metadata, useMetadataChange.

Constructors and Destructors

StorageMetadata()
Creates aStorageMetadata object to hold metadata for aStorageReference

Properties

Bucket
string
Returns
the owning Google CloudStorage bucket for theStorageReference
CacheControl
string
Returns
the Cache Control setting of theStorageReference
ContentDisposition
string
Returns
the content disposition of theStorageReference
ContentEncoding
string
Returns
the content encoding for theStorageReference
ContentLanguage
string
Returns
the content language for theStorageReference
ContentType
string
Returns
the content type of theStorageReference
CreationTimeMillis
DateTime
Returns
the time theStorageReference was created.
CustomMetadataKeys
IEnumerable< string >
Returns
the keys for custom metadata.
Generation
string
Returns
a version String indicating what version of theStorageReference
Md5Hash
string
Returns
the MD5Hash of theStorageReference object
MetadataGeneration
string
Returns
a version String indicating the version of thisStorageMetadata
Name
string
Returns
a simple name of theStorageReference object
Path
string
Returns
the path of theStorageReference object
Reference
Returns
the associatedStorageReference for which this metadata belongs to.
SizeBytes
long
Returns
the stored Size in bytes of theStorageReference object
UpdatedTimeMillis
DateTime
Returns
the time theStorageReference was last updated.

Public functions

GetCustomMetadata(string key)
string
Returns custom metadata for aStorageReference

Properties

Bucket

stringBucket

Details
Returns
the owning Google CloudStorage bucket for theStorageReference

CacheControl

stringCacheControl

Details
Returns
the Cache Control setting of theStorageReference

ContentDisposition

stringContentDisposition

Details
Returns
the content disposition of theStorageReference

ContentEncoding

stringContentEncoding

Details
Returns
the content encoding for theStorageReference

ContentLanguage

stringContentLanguage

Details
Returns
the content language for theStorageReference

ContentType

stringContentType

Details
Returns
the content type of theStorageReference

CreationTimeMillis

DateTimeCreationTimeMillis

Details
Returns
the time theStorageReference was created.

CustomMetadataKeys

IEnumerable<string>CustomMetadataKeys

Details
Returns
the keys for custom metadata.

Generation

stringGeneration

Details
Returns
a version String indicating what version of theStorageReference

Md5Hash

stringMd5Hash

Details
Returns
the MD5Hash of theStorageReference object

MetadataGeneration

stringMetadataGeneration

Details
Returns
a version String indicating the version of thisStorageMetadata

Name

stringName

Details
Returns
a simple name of theStorageReference object

Path

stringPath

Details
Returns
the path of theStorageReference object

Reference

StorageReferenceReference

Details
Returns
the associatedStorageReference for which this metadata belongs to.

SizeBytes

longSizeBytes

Details
Returns
the stored Size in bytes of theStorageReference object

UpdatedTimeMillis

DateTimeUpdatedTimeMillis

Details
Returns
the time theStorageReference was last updated.

Public functions

GetCustomMetadata

stringGetCustomMetadata(stringkey)

Returns custom metadata for aStorageReference

Details
Parameters
key
The key for which the metadata should be returned
Returns
the metadata stored in the object the given key.

StorageMetadata

StorageMetadata()

Creates aStorageMetadata object to hold metadata for aStorageReference

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2021-06-17 UTC.