I have been working on a code that will download a blob from the google drive using their API(V3). I want to get this working as I need to duplicate the file from google drive to firebase storage by using the fileUrl/ fileID.
I am able to export the pdf file after following a blog on medium
To do this you need to:
webContentLink
and open it to download the file. If you were to curl it you would get the file contents.// Create a root reference
var storageRef = firebase.storage().ref();
// Create a reference to 'mountains.jpg'
var mountainsRef = storageRef.child('mountains.jpg');
var file = ... // use the Blob you got on step 1
ref.put(file).then(function(snapshot) {
console.log('Uploaded a blob or file!');
});
Hope this helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.