How do I download a file from a website in a webviewer?

Hi Guys.

Great Post. I've managed to dowload a PDF file from a website with the following blocks:

I'm using this version of CustomWebView:

image
.

There are a couple of things I would like to ask you:

  • I only managed to dowload the file using "~". None of the other folders worked. I'm testing with an Android 10 phone.
  • How can I open the file after I've download it?
  • How can I load a webpage that has been packed with the APK? (With WebViewer I used "http://localhost/home.html".

Thanks!
Rui

I used the blocks below to run downloads in custom webviewer, but the file name is only named as the extension (.mp4). How do i make the right file name show?

Ciao ho seguito i tuoi consigli e se cambio la cartella in documents su alcuni siti funziona, solo a me servirebbe che funzionasse su questo sito https://www.regione.campania.it/regione/it/la-tua-campania/casa-di-vetro-smc2

È un sito istituzionale ma io non vado a modificare nulla semplicemente voglio che il sito lo apre nell'app e poi avere la possibilità di scaricare i documenti, che da browser normalmente riesco, invece attraverso customwebview non riesco, grazie mille.

Hello, I followed your advice and if I change the folder in the documents on some sites it works, only I would work on this website https://www.regione.campania.it/regione/it/la-tua-campania/casa-di-vetro-smc2

It is a website but I'm not going to change anything, simply, I want the site to open in the app, and then have the possibility to download documents from a web browser normally can't, however, through customwebview I can not, thank you very much.

hi vknow360,

so i have a web application that supports downloading reports via blob URL, where when the user clicks a button it will redirect to blob::http://mysite/report/245264363.

can this be handled with the following block? or is there another solution?

because i tried to use the block, the message "Runtime Error: Can not handle uri:: blob:http://mysite/report/245264363" appears

thanks for your help.

hi Anke,

so i have a web application that supports downloading reports via blob URL, where when the user clicks a button it will redirect to blob::http://mysite/report/245264363.

any suggestions on what kind of block would be appropriate to handle this case?

thanks for your help.

PDF and xls format reports, on the web side are handled with the jsPDF library.

Show your relevant blocks. Are you using the very latest version of customwebview?

well, the good news is i just found the latest version of the customwebview extension. i'm currently trying it out..

thanks so much this helps me so much! :smile: