Delay until each download finish in loop

I am trying to download 5 images (named 1,2…5)and want add in a list with name 1.jpg,2.jpg…
I tried with Clock delay block but while operation i am getting all images but all are having name 5.jpg.Actually i want once i download image it should get name 1.jpg and second should get 2.jpg and so on…

Please see attached blocks…

WHAT are you doing with your Clock? you just set to enabled and when timer, you set disabled. ???

Because it takes time to download. Your app changes index to 1 and after like a millisecond to 2, then 3, 4 and finally 5. So instead you should do when firebase download ended download next file

1 Like

In the morning or afternoon, I’ll provide aia about this topic.
Because right now I’m not using laptop :sweat_smile:.Till then pls wait.
Sorry for let you wait ,:pensive:

1 Like

I have created guide topic right now about downloading image with delay unit it completes
but it gone for approval so please wait till it get approved.

hi @shubh_patel
follow below post and use same logic for firebase download complete.

I want to download with firebase DB download only i tried with if loop but now i have to click every time to download next image …seethe blocks

How to avoide click every time?

Use procedure in which you set url of downloading file and its name. And call firebase download. When download complete then again call procedure and change data and start download.

Follow same logic building of following post I have explained everything in it.

1 Like

Hi @shubh_patel.
Have you checked that post ? If it help then tell me else I’ll try to help.yoh here​:upside_down_face::slightly_smiling_face:

Hi,
I seen that post but u have used procedure to call download file but with firebase download i am not getting that option.
I sent you aia pls check it …

I want to wait until download finish so clock is just for delay but it is useless because for each loop is keeps running and going to next number

1 Like

Which option

Because for loop runs till end without stopping

i got it i used two loops as shown in ur example and working …

Thanks.

It’s okay, I was here to help you.
And you understood I really like it.:kissing_heart::kissing_heart:

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