admin管理员组文章数量:1026989
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
// //
exports.onFileChange = functions.storage.object().onChange(event => {
console.log(event);
return;
});
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./docs/functions/write-firebase-functions
exports.onFileChange = functions.storage.object().onChange(event => {
console.log(event);
return;
});
Share
Improve this question
edited Sep 2, 2018 at 15:15
Doug Stevenson
319k36 gold badges456 silver badges473 bronze badges
asked Sep 2, 2018 at 15:10
Jader CostaJader Costa
3075 silver badges17 bronze badges
1
- 2 The message is telling you that onChange is deprecated and you should be using one of the other storage trigger types instead. You probably want onFinalize. Please read the documentation for storage events. firebase.google./docs/functions/gcp-storage-events – Doug Stevenson Commented Sep 2, 2018 at 15:13
1 Answer
Reset to default 7You have to use onFinalize() instead of onChange()
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
// //
exports.onFileChange = functions.storage.object().onChange(event => {
console.log(event);
return;
});
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./docs/functions/write-firebase-functions
exports.onFileChange = functions.storage.object().onChange(event => {
console.log(event);
return;
});
Share
Improve this question
edited Sep 2, 2018 at 15:15
Doug Stevenson
319k36 gold badges456 silver badges473 bronze badges
asked Sep 2, 2018 at 15:10
Jader CostaJader Costa
3075 silver badges17 bronze badges
1
- 2 The message is telling you that onChange is deprecated and you should be using one of the other storage trigger types instead. You probably want onFinalize. Please read the documentation for storage events. firebase.google./docs/functions/gcp-storage-events – Doug Stevenson Commented Sep 2, 2018 at 15:13
1 Answer
Reset to default 7You have to use onFinalize() instead of onChange()
本文标签: javascriptFirebase storageobject()onChange is now deprecated Stack Overflow
版权声明:本文标题:javascript - Firebase storage.object().onChange is now deprecated, - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1744942384a2125470.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论