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',
}
OptionalcustomOptionalmd5A Base64-encoded MD5 hash of the object being uploaded.
Object metadata that can be set at upload.
Deprecated
Use the exported types directly instead. FirebaseStorageTypes namespace is kept for backwards compatibility.