Page 1 of 1

Downloading files from WebGadget

Posted: Wed Nov 13, 2013 11:26 pm
by bbanelli
Greetings,

I have a very simple issue - if I try downloading something from WebGadget (that is, page that loads within it) from Windows, I get "Save file" dialogue and am offered to do so.

However, on OSX, clicking on a link that leads to a file (on the same page that works in Windows) produces no effect.

Am I doing something wrong? Can someone advise?

Thank you in advance,

Bruno

Re: Downloading files from WebGadget

Posted: Thu Nov 14, 2013 8:39 pm
by bbanelli
The same issue is reproducible on Linux as well.

Re: Downloading files from WebGadget

Posted: Tue Nov 19, 2013 11:10 pm
by bbanelli
No one? Link is not even obtainable via GetGadgetText() function, since it seems that browser simply ignores it.

I would have used some sort of navigation callback for clicked link to catch it and create my own download manager, but it works nor on OS X, neither on Linux.

Is there really no way to download a file from WebGadget on OS X (and/or Linux)? Is it a bug or a feature?

Obviously, this seems to be the problem. Though I'd only need "Save as" feature, not the actual "manager"...

http://stackoverflow.com/questions/9095 ... ystem-on-a

Edit2: I think I've got it! Will post code here when I tune it up! ;)

Re: Downloading files from WebGadget

Posted: Wed Nov 20, 2013 7:16 am
by wilbert

Re: Downloading files from WebGadget

Posted: Wed Nov 20, 2013 8:36 am
by bbanelli
Yes, I've came across that thread and am in process of finishing download manager (or at least the ability to easily download files from WebGadget in Mac OS X). As I've said, will be posting code once I get it to work perfectly! ;)

Speaking of, a question regarding downloading in general - I'm using ReceiveHTTPFile() function to get file, obviously. However, there are problems with redirected links, for example:

Code: Select all

GetHTTPHeader("https://secure.join.me/Download.aspx?installer=mac&webdownload=true")
returns

Code: Select all

HTTP/1.1 302 Redirect
Content-Length: 194
Content-Type: text/html; charset=UTF-8
Location: https://secure.join.me/Download.aspx?installer=mac&webdownload=true
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
X-Client-IP: 141.136.218.97
X-Server-IP: 77.242.192.201
Date: Wed, 20 Nov 2013 07:30:09 GMT
However, when

Code: Select all

ReceiveHTTPFile("https://secure.join.me/Download.aspx?installer=mac&webdownload=true", Filename$)
is called, it once again returns 302 redirected response, not the actual download file. How do "big" browsers settle this issue, since redirect points to the very same link once again (but file gets downloaded in Safari/Firefox/Chrome)?

Re: Downloading files from WebGadget

Posted: Wed Nov 20, 2013 9:03 am
by Shardik
Wilbert has already posted the link to my example which intercepts a click on a hyperlink in a WebGadget on MacOS. I have also demonstrated the same for Linux:
http://www.purebasic.fr/english/viewtop ... 15&t=54049