I am working with Google Text To Speech (TTS) in order to save a generated binary audio file to Google Cloud Storage (GCS).
Saving a local binary file d
Thanks @Doug_Stevenson and @AndersonMendes for the guidance!
I was including both the bucket id to my Google Cloud Storage and the file path in the same string which was the source of the error.
var bucket = storage.bucket('gs://[projectName].appspot.com');
bucket.upload(tempFile, { destination: ("directory/someFolderName/" + fileName) }, (err, file) => {
if (!err) {
console.log('Audiocast uploaded!');
} else {
console.error('Audiocast upload error: ' + err.message);
}
});