DownloadFile without URL

Find quick help here to get you started with Hollywood
Post Reply
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

DownloadFile without URL

Post by amyren »

I use an external file to store the server url, and load my ftp adress info a variable serverconfig$ to use with DownloadFile.
My current usage is to load a top10 highscore list from a server and into a virtual file. This works well, and also using UploadFile to update the file on the server.
Then I found that if serverconfig$ contains only a filename, without a network address then it will work by loading a local file.

Since the documentation says that the url$ argument must begin with http or ftp prefix, I wonder it this is a hidden feature in DownloadFile or just a coincidence? (UploadFile does not accept just a filename as an argument.)
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DownloadFile without URL

Post by airsoftsoftwair »

Can't reproduce this... I always get the error "Unknown protocol in URL!" (as expected). MCVE please.
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: DownloadFile without URL

Post by amyren »

My mistake.
I found I had ExitOnError set to False earlier so I didnt notice the error, and when the virtual file didnt exist the file was opened locally by openfile later. I have some mess to clean up there.
Post Reply