I'm trying to upload files to Storage.
All the examples that I can find are talking about local file path. (https://cloud.google.com/storage/docs/uploading-objects#storage-upload-object-code-sample)
I don't have access to local file path, I just have a blob object, or file object, or a base64 string of the image.
Here is my code:
const admin = require('firebase-admin');
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
storageBucket: "xxx.appspot.com"
});
var bucket = admin.storage().bucket();
await bucket.upload(myBlobFile;
And I got this error message:
[ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
Do you know if what I want is possible?