How to download files and show it in the app

I wanted the user to download download and show file… But only first selected file is opening always… Unable to show other downloaded file through PDF viewer


I want the user to download only once, hence I used tiny db. But unable to get through this. When clicked on second button it shows unable to display PDF !
Can anyone guide me through blocks section. Humble request

which extension your are using for PDF also mention its link

It’s opening only the first file because, when first file downloaded, TinyDB (the Global Tag) remains no more blank. And, as per your coding, second file is not even downloading.