How do I save a file to desktop?

Get help using Construct 2

Post » Tue Jun 07, 2016 12:07 pm

Is there a way to have my app/game save a file to desktop? Like with a windows file picker?
I'm making a level generator and it exports all the necessary data to a text box. Now I would like to have a "save as" feature that would just download/save its content without sending it to an external script with ajax etc. Possible?
B
16
S
7
G
1
Posts: 154
Reputation: 3,117

Post » Fri Jun 10, 2016 11:47 pm

You have to use the File Chooser feature and ask the user to save it. Anything else is a security violation.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822

Post » Sat Jun 11, 2016 3:03 am

You need to use NW.js in order to be able to specify a storage location other than webstorage - this of course won't work for HTML5 or mobile device compiles.

If you need help let me know, I've worked with NW.js a bit and can probably make an example.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
80
S
34
G
40
Posts: 3,029
Reputation: 30,393


Return to How do I....?

Who is online

Users browsing this forum: alextro, tarek2, wenwen11212016 and 10 guests