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 | stringReturns | the owning Google CloudStorage bucket for theStorageReference | |
CacheControl | stringReturns | the Cache Control setting of theStorageReference | |
ContentDisposition | stringReturns | the content disposition of theStorageReference | |
ContentEncoding | stringReturns | the content encoding for theStorageReference | |
ContentLanguage | stringReturns | the content language for theStorageReference | |
ContentType | stringReturns | the content type of theStorageReference | |
CreationTimeMillis | DateTimeReturns | the time theStorageReference was created. | |
CustomMetadataKeys | IEnumerable< string >Returns | the keys for custom metadata. | |
Generation | stringReturns | a version String indicating what version of theStorageReference | |
Md5Hash | stringReturns | the MD5Hash of theStorageReference object | |
MetadataGeneration | stringReturns | a version String indicating the version of thisStorageMetadata | |
Name | stringReturns | a simple name of theStorageReference object | |
Path | stringReturns | the path of theStorageReference object | |
Reference | | Returns | the associatedStorageReference for which this metadata belongs to. | |
SizeBytes | longReturns | the stored Size in bytes of theStorageReference object | |
UpdatedTimeMillis | DateTimeReturns | the time theStorageReference was last updated. | |
Public functions | |
|---|---|
GetCustomMetadata(string key) | stringReturns custom metadata for aStorageReference |
Properties
ContentDisposition
stringContentDisposition
| Details | |
|---|---|
| Returns | the content disposition of theStorageReference |
CustomMetadataKeys
IEnumerable<string>CustomMetadataKeys
| Details | |
|---|---|
| Returns | the keys for custom metadata. |
Generation
stringGeneration
| Details | |
|---|---|
| Returns | a version String indicating what version of theStorageReference |
MetadataGeneration
stringMetadataGeneration
| Details | |
|---|---|
| Returns | a version String indicating the version of thisStorageMetadata |
Reference
StorageReferenceReference
| Details | |
|---|---|
| Returns | the associatedStorageReference for which this metadata belongs to. |
UpdatedTimeMillis
DateTimeUpdatedTimeMillis
| Details | |
|---|---|
| Returns | the time theStorageReference was last updated. |
Public functions
GetCustomMetadata
stringGetCustomMetadata(stringkey)
Returns custom metadata for aStorageReference
| Details | |||
|---|---|---|---|
| Parameters |
| ||
| 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.