Save txt file

Hi all, I should save query data in a txt file on file system, is it possible to do this using node.js backend?

For NodeJS people:

For PHP people:

The data query object must be JSON encoded (there’s a formatter, not sure if it’s in the UI) so it becomes a string, and that can be written to a file

3 Likes

Thanks for the reply, I didn’t quite understand where the module should be installed.
The readme file says to copy it to the /extensions/server_connect/modules folder but it doesn’t exist in my project.

Indeed, you need to create the folder, it’s not pre-created by default unfortunately

2 Likes

Thanks, everything works fine

Hi Apple, a question, but is it possible to save the file outside the project directory?
For example on a network folder?
I’m trying to give a path different from that of an internal folder but it always generates an error

Looking at the code:

It seems the folder is converted to the project folder (or something like that?), so you’ll probably need to change that line to:

let path = options.path