Where does the plugins.file.writeTXTFile() saves the file? Client or Server side?
Am I correct if I think that executing that function from a headlessclient or webclient is server side and executing it from smartclient is client side?
Thanks.
Where does the plugins.file.writeTXTFile() saves the file? Client or Server side?
Am I correct if I think that executing that function from a headlessclient or webclient is server side and executing it from smartclient is client side?
Thanks.
You are correct.
Thanks Patrick. I suppoused that but is is not easy to find out from developer.
Look in the Servoy wiki…
When using the File plugin, it’s important to take into account the differences and compatibility between different clients:
Interacting with the file system through the plugin in a Smart Client happens client-side, so on the machine where the Smart Client is launched. On all other clients (Web, Headless & Batchprocessor), the operations are performed on the Server.
All showXxxxDialog(…) functions interact with the user through a UI. These function can only be used in Clients that provide a UI, like the Smart and Web Client.
The showXxxxDialog(…) functions, when used in the Web Client, have certain limitations due to being operated in a browser. Browser security (currently) limits interaction with the local file system, except for single file select operations initiated by the user clicking a button.
writeTXTFile can write a file to the client/browser for a webclient
That just depends on what the first argument is, is that a real JSFile object then it will write it on the server filesystem
if that is just a string/name like “mytxtfile.txt” then a file save dialog is shown in the browser and a user can save it where he wants it.