Allow Downloads from Websites with Browser Widget?

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
bkyan
Posts: 4
Joined: Mon Jun 18, 2018 8:20 am

Allow Downloads from Websites with Browser Widget?

Post by bkyan » Mon Jun 18, 2018 10:19 pm

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

rocco
Posts: 1
Joined: Mon May 01, 2017 3:55 pm

Re: Allow Downloads from Websites with Browser Widget?

Post by rocco » Tue Feb 04, 2020 7:52 pm

Hi Benjamin,
have you solved?
If yes, how?

Thank you in advance
Rocco

bkyan
Posts: 4
Joined: Mon Jun 18, 2018 8:20 am

Re: Allow Downloads from Websites with Browser Widget?

Post by bkyan » Fri Feb 07, 2020 1:47 am

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

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Allow Downloads from Websites with Browser Widget?

Post by [-hh] » Fri Feb 07, 2020 6:39 pm

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).
shiftLock happens

bkyan
Posts: 4
Joined: Mon Jun 18, 2018 8:20 am

Re: Allow Downloads from Websites with Browser Widget?

Post by bkyan » Sun Feb 09, 2020 3:25 am

Thanks, [-hh]! I'll give that a try!

--Benjamin

Post Reply

Return to “Internet”