blurymind / YarnClassic

A tool for writing interactive dialogue in games!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should have a Save As Yarn option that shows save location prompt

cjacobwade opened this issue · comments

My intended workflow for Yarn is to open files in my project in the web version of Yarn, make changes as needed then export back into the project. Currently the Save As Yarn menu option goes straight to the downloads folder without a prompt. Would love to get a location prompt so I can save over the existing asset in my project.

As far as I can tell this is either currently impossible, or currently being drafted and worked on as far as what is allowed in browsers and what isn't (this doesn't have anything to do with YarnEditor). The reason for this is mostly for security. The browser determines where things are saved and for security reasons we can't access your file system.

However, there are some workarounds, albeit maybe not ideal for you:

  1. Change your browser settings to ask you where you want to save a file every time a file is downloaded. On Chromium based Edge this setting looks like this:
    image
    I would've suggested change where your browser downloads files to your working Yarn directory but this won't overwrite files and will make new files with numbers appended to them each time. So you need to have the browser ask you what to do with the files manually to overwrite them properly.

  2. Use the desktop version and open your files in that. Hitting Ctrl + S will automatically overwrite and save your file to whatever directory you opened your file from.

Sorry, from my research this seems to be a web security issue rather than a YarnEditor one.

Once this is supported on mobile and more browsers, it might be worth looking into adding support for it
https://caniuse.com/native-filesystem-api
right now is not well supported and not a standard yet

this is now implemented