How do I save the location of a file downloaded as a string

0 favourites
  • 4 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Hi,

    I am using the browser object to 'invoke download string' to allow me to save data from my app into a .xml file.

    I am using NWJS for my app and this method lets the user choose the location of the save file and its filename. (If you run it in Chrome only it saves automatically to your chrome save file folder).

    I'd like to be able to save the file location and name to a string when the user clicks ok.

    Is there a way to save this to a string, or force the browser download location to a set folder on the users computer?


  • Hi,

    Maybe I miss something but if you use nw.js, why you don't use the action Write file in nw.js ?


  • Hi MadSpy

    When I tried to use write file in nwjs nothing seemed to happen. I couldnt find any examples online to check what I was doing wrong.


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • As an update I an using the prompt save dialogue to let the user choose a save location and give a filename.

    I am then using 'on save ok' to write the file to the location (NWJS.chosenpath & ".xls")

    This creates two files. i) filename and ii) filename.xls (I assume as I called the save dialogue ok action)

    Does anyone know if there is a way to save just one file and allow the user to pick a location and file name in NWJS? I am also trying to store the file name as one variable and the save location as another.

    Any ideas?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)