OptionalcacheThe 'Cache-Control' HTTP header that will be set on the storage object when it's requested.
To turn off caching, you can set the following cacheControl value.
{
cacheControl: 'no-store',
}
To aggressively cache an object, e.g. static assets, you can set the following cacheControl value.
{
cacheControl: 'public, max-age=31536000',
}
OptionalcontentThe 'Content-Disposition' HTTP header that will be set on the storage object when it's requested.
OptionalcontentThe 'Content-Encoding' HTTP header that will be used on the storage object when it's requested.
OptionalcontentThe 'Content-Language' HTTP header that will be set on the storage object when it's requested.
OptionalcontentThe 'Content-Type' HTTP header that will be set on the object when it's requested.
This is used to indicate the media type (or MIME type) of the object. When uploading a file
Firebase Cloud Storage for React Native will attempt to automatically detect this if contentType
is not already set, if it fails to detect a media type it will default to application/octet-stream.
For DATA_URL string formats uploaded via putString this will also be automatically extracted if available.
Setting the content type as JSON, e.g. for when uploading a JSON string via putString.
{
contentType: 'application/json',
}
OptionalcustomTokens to allow access to the download URL.
Storage object generation values enable users to uniquely identify data resources, e.g. object versioning.
Read more on generation on the Google Cloud Storage documentation.
Optionalmd5A Base64-encoded MD5 hash of the object being uploaded.
Storage object metageneration values enable users to uniquely identify data resources, e.g. object versioning.
Read more on metageneration on the Google Cloud Storage documentation.
OptionalrefStorageReference associated with this upload.
The size of this storage object in bytes.
The full readable metadata returned by
TaskSnapshot.metadataorStorageReference.getMetadata().Deprecated
Use the exported types directly instead. FirebaseStorageTypes namespace is kept for backwards compatibility.