File Open / File Save - Forum

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

File Open / File Save

Are there commands for File Open and File Save with NEO Web? What exactly does the File Input tool do? I know you cannot access local drives with JavaScript from the Internet, But what about from an offline App? Do Local Storage SetItem and GetItem actions perform the same as File Open and File Save?

Google Chrome has a "blob" feature that lets the Chrome browser communicate with external programs by sending text information back and forth through the Downloads Folder.... Is this what the NEO Web Local Storage also does?

I followed this link

https://webhelp.visualneo.com/FileInput.html

and found out how to Open Files...

Now I need to know how to Save a local file...

Now I need to know how to Save a local file...

@fkapnist for security reason it's not currently possible to save local files, but you can "download" them using VarToLocalFile.

If you are developing for the desktop compiling to NWjs, you can freely access the local file system using Node commands just like this:

BeginJS
var fs = require('fs');
fs.appendFile('mynewfile1.txt', 'Hello content!', function (err) {
  if (err) throw err;
  console.log('Saved!');
});
EndJS

Hope it helps.

 

So with web apps you can open files and edit them but you cannot save them? Whose bright idea was that? (Google, no doubt.) Supposedly if a website accesses files on your local drive, it might be harmful... But if your download a Windows program that does exactly the same thing (and pings back to the author), that is quite alright. I could never understand the logic of that.

Is VarToLocalFile only for text files or does it work with bitmaps and media files too?

 

 

Is VarToLocalFile only for text files or does it work with bitmaps and media files too?

@fkapnist It should work with anything you can store in a Variable.

@fkapnist perhaps you would like to explore this new API (only for Chrome):

https://web.dev/file-system-access/

Regards.

fkapnist and asmat have reacted to this post.
fkapnistasmat

So it was Google's idea to not allow web apps to save files. Unless you use their product. That, in a nutshell, is what monopolies are all about..

Google became our self-described :  Load and Save Your As.....  haha