Var dest = fs.createWriteStream('/tmp/filename.txt') Ĭonsole.log('Error during download', err) Īlso, the below method will return all the files which you have access to in drive. It is on official google website for doing the same: var fileId = '1ZdR3元qP4Bkq8noWLJHSr_iBau0DNT4Kli4SxNc2YEo' Click the dot grid in the top right corner of Google and click Docs. If above solution doesn't work, you can use this one. Go to and sign into your Google account. All restored data, whether Google Drive files or folders, Gmail messages, contacts, calendar events, or Sites files, will be placed in a specially created. This is how it works: const filePath = `give_path_tosave_file` Ĭonst dest = fs.createWriteStream(filePath) Ĭonsole.error('Error downloading file.') When you run '' for google drive API you receive a promise, and to get data you have to use then on it.
0 Comments
Leave a Reply. |