🟦 HOWTO: Download "private/restricted" files from Google Drive, including downloading Directories, SubDirectories and Files


This guide shows how you can download a private/restricted file from google drive to your app, using a google apps script web app. Expanding on this, it also demonstrates how to download a directory structure from google drive and replicate it on an android device.

Notes:

  • requires knowledge of google apps script creation and publishing
  • and before anyone starts....it is purposefully intended to ask the user for read/write permissions when compiled
  • I realise that I may only need to ask for read permission in Android 11
  • the missing Stage 2 has now been completed

Nice, but encoding the bytes to Base64 is not a good idea, it increases the size much. It's better encoding in a hexadecimal format which a little decreases the size. Also compressing the data before sending it using any Deflate/Zip method and decompressing in the app using JS or some tool would be good.

Remember that you can always present your solution for downloading files from google drive here.

Demonstration how to do it in practice. It will be more helpful.

Yes, that was my suggestion:

I cannot demonstrate it, I'm doing other work and not active anymore.
If anyone felt my behavior is rude, then sorry for that :slightly_smiling_face:

If you have a better / different method then I am all ears! More the merrier.

1 Like