Server.downloadFile() - any extra error data?
-
So starting on my download journey... is there any additional data available to me if success = false?
For example the same way there is Error (the text of some error) in extractZipFile, or better still the sort of returned values from the server itself like in Server.callWith POST() ??
-
@Lindon I don't think you'll get any other info. If you test in Hoppscotch or postman you can see what data is available.
-
@d-healey said in Server.downloadFile() - any extra error data?:
@Lindon I don't think you'll get any other info. If you test in Hoppscotch or postman you can see what data is available.
Thanks, yeah but even if I see it in postman I wouldn't be able to get to it in the callback function in downloadFile()
Does downloadFile break often? Not much?
-- I plan on downloading multiple files one at a time - installing their contents and then moving on to the next one using a data structure like this:
reg setupManifest = { "setupSteps" : [ { "downloadFileName" : "some/file/name/here/HorizenDataT01.sfc", "downloadFileDestination" : "HorizenDataT01.sfc", "installDestination" : USERSAMPLE_LOCATION, "status" : UNSTARTED }, { "downloadFileName" : "some/file/name/here/HorizenDataT02.sfc", "downloadFileDestination" : "HorizenDataT02.sfc", "installDestination" : USERSAMPLE_LOCATION, "status" : UNSTARTED },```
-
@Lindon said in Server.downloadFile() - any extra error data?:
Does downloadFile break often? Not much?
I've never had any issues in my tests and I haven't had any users reporting such issues.
The only time I have seen a problem is in a project for another developer where they are accessing different folders on MacOS. Sometimes the downloads just fail to complete, the reason turned out to be they were trying to write to folders that the user didn't have permission to write to. If you think you might run into that situation then you could check before downloading that the target is writable.
I plan on downloading multiple files one at a time
I wouldn't do more than 3 at once (unless they're tiny). https://docs.hise.audio/scripting/scripting-api/server/index.html#setnumalloweddownloads
-
@d-healey said in Server.downloadFile() - any extra error data?:
@Lindon said in Server.downloadFile() - any extra error data?:
Does downloadFile break often? Not much?
I've never had any issues in my tests and I haven't had any users reporting such issues.
The only time I have seen a problem is in a project for another developer where they are accessing different folders on MacOS. Sometimes the downloads just fail to complete, the reason turned out to be they were trying to write to folders that the user didn't have permission to write to. If you think you might run into that situation then you could check before downloading that the target is writable.
Thanks for this... Well its a temp spot so I intend to use:
FileSystem.Downloads
-- and Im going to assume this is user writable...
I plan on downloading multiple files one at a time
I wouldn't do more than 3 at once (unless they're tiny). https://docs.hise.audio/scripting/scripting-api/server/index.html#setnumalloweddownloads
As I say - not even 3 at a time... one at a time only...some of them are NOT tiny
-
FileSystem.Downloads
-- and Im going to assume this is user writable...
Yes this should always be writable, otherwise it's a user issue :)
-
@d-healey said in Server.downloadFile() - any extra error data?:
FileSystem.Downloads
-- and Im going to assume this is user writable...
Yes this should always be writable, otherwise it's a user issue :)