File save load like desktop app?

File save load like desktop app?
0

Hi, I am new to Cocos Creator, our team is doing a web mini game. Now we are adding a mini stage editor in it. However we are not sure what is the best way to let designer to save/load stage file to/from their local drive. The current approach we using is pop up a EditBox let them to import / export a long json however. It’s currently “enough” to our situation. Just a 64kb limit to editbox we need reduce the json string size.
So we are looking any traditional way to let user select file on their disk to open, and “save as” to their disk?
Thank you very much!

Sum

to export file: https://www.npmjs.com/package/file-saver
to import file: https://developer.mozilla.org/en-US/docs/Web/API/FileReader
example: http://brofist.io/editor/index.html

Thank you very much, i will have a look in it :smiley: