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.)
DownloadFile without URL
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: DownloadFile without URL
Can't reproduce this... I always get the error "Unknown protocol in URL!" (as expected). MCVE please.
Re: DownloadFile without URL
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.
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.