I\'m sure this has a simple answer, but for the life of me I can\'t figure out how to do it.
I have the following express endpoint for uploading to Google Cloud sto
@GabeRogan gave me the answer (and I had a typo, as expected)
Here's my updated code for the front end which returns the response body text:
Client.upload(this.file).then(response => response.text())
.then((body) => {
console.log(body);
});
body is a string that reads "Unique File Name: [FILE-NAME]"
EDIT:
Here's a good explanation of the Fetch API and reading the response you get from the promise object: https://css-tricks.com/using-fetch/