Page 1 of 1

Allow Downloads from Websites with Browser Widget?

Posted: Mon Jun 18, 2018 10:19 pm
by bkyan
Hello!

In the (regular) Chrome browser, when you click on a file to download on a website, it asks you where you want to save the file, and proceeds with the download. When I try the same thing with LiveCode's Browser Widget, it does nothing, as far as I could tell. Is there a way to get LiveCode's Browser Widget to behave like the (regular) Chrome browser? (I'm running on a Windows 10 computer.)

-- Benjamin

Re: Allow Downloads from Websites with Browser Widget?

Posted: Tue Feb 04, 2020 7:52 pm
by rocco
Hi Benjamin,
have you solved?
If yes, how?

Thank you in advance
Rocco

Re: Allow Downloads from Websites with Browser Widget?

Posted: Fri Feb 07, 2020 1:47 am
by bkyan
Rocco,

I haven't solved this yet, but I spoke with the LiveCode team, and they are going to try to help me out. I'll post the solution, here, when I hear back.

-- Benjamin

Re: Allow Downloads from Websites with Browser Widget?

Posted: Fri Feb 07, 2020 6:39 pm
by [-hh]
Until that you could simply use browserUnhandledLoadRequest, e.g.

Code: Select all

on browserUnhandledLoadRequest pUrl
  -- set download target:
  set itemdel to slash
  put item -1 of pURL into tF
  set itemdel to comma
  ask file "Download as:" with tF
  if it is empty then exit browserUnhandledLoadRequest
  -- download:
  put url(pURL) into url("binfile:"&it)
end browserUnhandledLoadRequest
Put the above into the script of the widget (or the script of the card containing the widget).

Re: Allow Downloads from Websites with Browser Widget?

Posted: Sun Feb 09, 2020 3:25 am
by bkyan
Thanks, [-hh]! I'll give that a try!

--Benjamin

Re: Allow Downloads from Websites with Browser Widget?

Posted: Fri Jun 04, 2021 6:45 am
by D4vidrim
Hi!
Any luck?

Re: Allow Downloads from Websites with Browser Widget?

Posted: Wed Nov 17, 2021 12:16 pm
by Klaus
Hi bethoust,

[-hh] (Hermann Hoch) was a university professor for mathematics, so you bet he wrote it by himself.
Unfortunately he passed away earlier of this year, a very tragic loss.


Best

Klaus

Re: Allow Downloads from Websites with Browser Widget?

Posted: Wed Nov 17, 2021 10:17 pm
by stam
I keep finding snippets of Herman's code and he does have some pretty nice widgets still uploaded to a website. Clearly he was an extremely talented LC dev and a force for good (development). I didn't realise he'd passed away this year, very sad to hear that - a tragic loss indeed :(