HISE Logo Forum
    • Categories
    • Register
    • Login

    Server.downloadFile() - any extra error data?

    Scheduled Pinned Locked Moved General Questions
    7 Posts 2 Posters 202 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LindonL
      Lindon
      last edited by

      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() ??

      HISE Development for hire.
      www.channelrobot.com

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Lindon
        last edited by

        @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.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @d.healey
          last edited by

          @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
          		},```

          HISE Development for hire.
          www.channelrobot.com

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @Lindon
            last edited by d.healey

            @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

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @d.healey
              last edited by Lindon

              @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

              HISE Development for hire.
              www.channelrobot.com

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @Lindon
                last edited by

                @Lindon

                FileSystem.Downloads

                -- and Im going to assume this is user writable...

                Yes this should always be writable, otherwise it's a user issue :)

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                LindonL 1 Reply Last reply Reply Quote 1
                • LindonL
                  Lindon @d.healey
                  last edited by

                  @d-healey said in Server.downloadFile() - any extra error data?:

                  @Lindon

                  FileSystem.Downloads

                  -- and Im going to assume this is user writable...

                  Yes this should always be writable, otherwise it's a user issue :)

                  😉

                  HISE Development for hire.
                  www.channelrobot.com

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  30

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  102.5k

                  Posts