I am using the Firebase web client and would like to upload JSON to Cloud Storage. I can create a reference using firebase.storage().ref().child("/testing.json");
, however I am not sure how to upload the JSON string. The docs only mention uploading files, blobs, and base64 encoded strings.
For example, how do I finish the below to upload to the JSON string to cloud storage, to be stored as a JSON file with "application/json" content type?
const ref = firebase.storage().ref().child("/testing.json");
const jsonString = JSON.stringify({ hello: "world" });
ref.put() // ???