I am trying to write an HTML file into Google Cloud Storage without saving the file in my node application. I need to create a file and immediately upload to the Cloud Storage.
I tried using fs.writeFileSync() method, but it creates the file in my application and I do not want that.
const res = fs.writeFileSync("submission.html", fileData, "utf8");
GCS.upload(res, filePath);
I expect to save an HTML file in the Cloud Storage directly. Could you please recommend the right approach to me?