Im doing a trigger to resize image after upload to firebase database but I got this message: Error: "onChange" is now deprecated, please use "onArchive", "onDelete", "onFinalize", or "onMetadataUpdate". at ObjectBuilder.onChange (/home/kill/trigger/functions/node_modules/firebase-functions/lib/providers/storage.js:88:15), I aslso tried : functions.storage.object().onArchive, it`s works on terminal but when i check in the function on firebase GUI, there is a error code:13, "failed to configure trigger..", someone could help me? Appreciate guys
const functions = require('firebase-functions');
// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
exports.onFileChange = functions.storage.object().onChange(event => {
console.log(event);
return;
});
You have to use onFinalize() instead of onChange()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With