exports.helloGCS = (event, context) => {
const gcsEvent = event;
console.log(`Processing file: ${gcsEvent.name}`);
const object = event.data;
const filePath = gcsEvent.bucket;
console.log(`Bucketname: ${gcsEvent.bucket}`);
我正在尝试创建名为CCD_ 2的CCD_,我需要文件路径为gs://bucketname/filename
,但是当我尝试时
const filePath = ('gs://${gcsEvent.bucket}/${gcsEvent.name}');
// the output in my log is
gs://gcsEvent.bucket/gcsEvent.name
我该怎么做?
const filePath = (`gs://${gcsEvent.bucket}/${gcsEvent.name}`);
您希望使用"而不是",以便将其标识为变量而不是字符串。