Download images from google drive

I have replaced the code but when I publish and deploy as web it comes error:

You need a curly bracket at the end, on line 12

}

You may also need to add the Drive api to your resources:

driveapi2

I have done Every as you had told me. But still there is soemthing is missing.


[Fetch_FILE_BY_FILE.aia|attachment]
Please see my .aia
Fetch_FILE_BY_FILE.aia (18.5 KB)

OK, let me test

Did you add the Drive API ?

I am getting a bad-base64 error.

Did you republish the app to a new version, do it anyway

1 Open the script project
2 Go to Publish
3 Deploy as Web App
4 Project version: - select New from the dropdown
5 Execute the app as: your google account address (email)
6 Who has access to the app: Anyone, even anonymous
7 Press the Update button

You have to do this EVERY TIME you change your script

Also check your script url again, did it change when you put in the new code ?

I am sure I have done all steps
But I might missed something in my blocks or copy in wrong way.

I tried to run the script in web and there is error

It works !! :+1:

Use this aia project

Fetch_FILE_BY_FILE_revised.aia (18.6 KB)

(there were a few errors in your aia file which have been fixed.)

Please note that I have set the NumberOfFiles local variable to 5 for testing purposes, you will need to put the length of list block back in to attempt a download of all 600+ files, when you are ready

While testing, remember to run tinydb1.ClearAll after downloading files in order to reset the firstrun tag.

Yes. it works now.
Thank you so much for the great job.
You are really a very helpful man.
Good luck.

Just to finish this off, for others that may follow, a link to:

HOWTO: Create a Google Apps Script Web App bound to a Spreadsheet

Hello Tim,

I'm sorry to come back again into this topic after closing it.
Could you please help me and revise my blocks again because I am trying to add a clock in order to continue download files if there is cut in the internet or the user need to come back again in any time he need then he can download from where he stopped.
Fetch_FILE_BY_FILE_revised_Continue_download.aia (19.5 KB)

I am having a think about this....would have been much easier to include this requirement at the beginning!

OK, this seems to work:

Fetch_FILE_BY_FILE_revised_net_stop.aia (27.2 KB)

Again, have replaced noOfFiles with a number (10) instead of all the files from length of list.

Can't use the notifier progress dialog anymore, because it would block the clicking of the Stop button, so you have an on screen progress line instead (thanks Taifun)

I notice you have renamed the files again to page1.jpg/page2.jpg. these need to be page001.jpg/page002.jpg for proper ordering.

I am sorry to bother you too much Tim. It just at the moment this idea came to my mind. Since yesterday I was trying but I don't know how can I code the blocks.

Thank you so much Tim for your kindness and efforts to help people.

Hello Tim,

I am sorry to tell you that I don't have an extention for net connection.
Can you please send me a link to download that one.
Thank you too much Tim for help.
Good luck.

https://www.aix-extensions.fr/downloads/internet-checker-extension/

Osama, unless you need them open to all as they are, you can reduce the access/visiblity of your files on Google Drive, so that only your app can access them - e.g. make them private....

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.