DownloadFile()

Feature requests for future versions of Hollywood can be voiced here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

DownloadFile()

Post by djrikki »

Hi Andreas,

I am going through the process of removing Wget and Curl dependancies from Jack, the former I have removed completely now.

In order to remove Curl though I need to be able to do two things, the first of which I *think* is impossible with the current
version of the DownloadFile() command.

1) I want to be able to compare the date of a local file against that of a remote file and only if the remote file is newer does
the transfer begin. At present I use Curl with the -z argument in order to do this.

curl -z ENVARC:jack/featured.xml http://www.lakewebdesign.co.uk/jack/featured.xml -o ENVARC:jack/featured.xml -silent

2) Still thinking on this one, I need to be able to call a .PHP script with URL params. Shouldn't be a problem as long as DownloadFile()
is set to Redirect so I can get the resulting content. In fact thinking about it- it should be a non-issue. When Curl does this it appends
HTTP Headers at the front of the content- I suspect I will still have to handle that.

Anyways typing it down here makes it somewhat clearer for me on what I have to do. However, I suspect point (1) will keep Jack reliant
on Curl for the one instance (at present) it is required in the whole app. :lol:
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DownloadFile()

Post by airsoftsoftwair »

The first one is not possible with DownloadFile() but of course you can communicate with the remote server directly using OpenConnection(), check the file date yourself, and then call DownloadFile() if the date is newer. No big deal.
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: DownloadFile()

Post by djrikki »

Thanks Andreas, I'll take a look down that route.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
Post Reply