我在云函数中的 if 子句使用通配符startWith:
exports.resizeImage = functions
.storage
.object()
.onFinalize(async (object) => {
if (!object.name.startsWith('venues/{uid}/bg_img')) {
console.log(`File ${object.name} not a venue bg pic..ignoring it`);
return null;
}
我假设你不能使用startsWith通配符?如果是这样,还有什么选择?
哔哔one
相关分类