VarToLocalFile - Forum

Forum Navigation
You need to log in to create posts and topics.

VarToLocalFile

When I use the VartoLocalFile function, after creating the file, the program automatically opens the note pad to display this file ... Can't we prevent this?
Regards,

Hi @cdy44-2,

Note that, due to security restrictions, you are not writing the file to the local file system, but downloading the file. File downloads are managed by the Web Browser wich usually ask about opening or saving the file. Anyway you can config the web browser on how to proceed.

There is a very new FileSystem API that works only in Chrome. I'm considering adding it as a plugin in VisualNEO Web.

Best regards.

Hi Luis,
Thank you. So a question came to my mind, what "VarToLocalFile" is useful for ? This behavior may be surprising to the user.
Best regards,

Thank you. So a question came to my mind, what "VarToLocalFile" is useful for ? This behavior may be surprising to the user.

It's surprising only for those not used to WebApps.
Using VarToLocalFile you offer your users a way to download whatever useful information for them.
For example, in aprendiendo.top you can download your own complete projects in a propietary JSON format, including images, questions, answers... in an unique file. Later you can load the file again into the app (or after registration, upload it to a cloud database).
As the downloaded file has a propietary format and extension, the web browser will not be able to open it so it will just ask where to save it. Most web apps work this way. As a more advanced example, you can take a look at photopea (Online PhotoShop clone)

Vadim and CDY@44 have reacted to this post.
VadimCDY@44