I use Firebase function to detect an upload event to Storage and write the download URL to the database like so:
exports.processFile = functions.storage.obje
Before SDK 1.0 there was only the onChange() event. It fired for all changes to the storage object and one had to test resourceState in the object metadata to determine if the change was a creation, update, or deletion.
In SDK 1.0, onChange()
has been replaced by four events, eliminating the need to test the value of resourceState
:
Although the documentation for ObjectMetadata still shows resourceState
, my guess is that it has been removed from SDK 1.0 because it is no longer needed.