i want to upload files to google drive using nodeJS as backend. I have used google drive API v3. I get the file id and type in response after uploading a file.
drive.files.create({
resource: {
name: 'Test',
mimeType: 'image/jpeg'
},
media: {
mimeType: 'image/jpeg',
body: fileData
}
}, function(err, result){
if(err)
res.send(err);
else
res.send(result);
});
but what i want is when i upload a file i want it as publicly accessible. i want the shareable link of that file in response. Is there any way to do so ? i have implemented the way given here : https://developers.google.com/drive/v3/web/manage-sharing which works fine with s.showSettingsDialog(). But i want the shareable link at the time i upload the file.