I have a google sheet on which links are generating (by calculation) for downloading / uploading in G-Drive.

I want when links are generated, I can upload file (from generated link) to directly in my G-Drive.

I have used following method but this have only limit of 50MB:

Drive.Files.insert(filename_in_GDrive, URL_in_Sheet)

I have to upload large files (around 500MB and sometimes around 1GB); so how could I achieve this task?

  • Unfortunately, at Google Apps Script, there is the limitation of 50 MB (52,428,800 bytes) for UrlFetchApp and the blob size. So in your situation, it is required to run by combining the resumable download and the resumable upload. At first, download the file from URL as chunks by the resumable download. Then, join the downloaded chunks by the resumable upload. – Tanaike Feb 12 at 8:36
  • @Tanaike, could you please further elaborate it or share some example as I am not so expert with google-apps-script and google-drive. – Saad Bin Khalid Feb 13 at 3:26
  • 1
    I'm really sorry for my incomplete comment. For example, you can see the official document at developers.google.com/drive/api/v3/resumable-upload and developers.google.com/drive/api/v3/… Please check them. – Tanaike Feb 13 at 3:44
  • @Tanaike, I have checked your provided links (and also search) but I can't figure it out how I can use this methods in App-Script (sorry for silliness), the examples in the links are regarding PHP, JS, etc. Could you please share any example regarding App Script. – Saad Bin Khalid Feb 19 at 11:11
  • I apologize that their links were not useful. – Tanaike Feb 19 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.