downloadFile doesn't seem to overwrite
-
Server.downloadFile
doesn't want to re-download/overwrite a file when it is already present in the directory.
I thought it was overwriting each tie with no pity
Even if I remove the downloaded files, I have to relaunch Hise again at each try or the server doesn't want to start again -
@ustk Read the docs ;)
https://docs.hise.audio/scripting/scripting-api/server/index.html#cleanfinisheddownloads
If you call this method with a file that already exists, the method assumes that it's a previously stopped download and resumes the download at the position
-
@d-healey Yeah I overlooked this one... Thanks :)
But it is confusing (to me at least) because above it is written:Be aware that this file will be deleted and overwritten!
-
@ustk Yep that is confusing
-
@d-healey I'm finding the download function to be rather unreliable. On Mac it's just about ok, but windows not - lots of stopping before the download has finished and 'if(this.data.finished)' seems to activate anyway, even though file is not complete....
Think I'm going to park it for now tbh
Anyone having success with it?
-
Looks intresting.
Is there any limitation for downloading files?
-
@Steve-Mohican a file size over 2GB was causing me issues
-
-
-
@d-healey not really, PercX is using a custom C++ code that predates the HiseScript Server stuff.
But apart from the flakiness of the download calls, 2GB is a limit that you don't want to exceed for any file. Many file systems choke with files that exceed the 32bit range - that is precisely why split archives were invented.
-
-
Nothing particular but it‘s fresh from the oven and it requires a bit of real world usage to sort out the kinks.
-
@Christoph-Hart Well just to feedback one of my standalone compiled projects works fine, but the other not so much. The only difference in the two scripts is the urls....
I assume the 2GB limit applies when downloading via a web browser too?
-
@DanH said in downloadFile doesn't seem to overwrite:
The only difference in the two scripts is the urls....
Try swapping the URLs in the two projects and see what happens.