Opening files from NG Client webclient

Hi,
I’m wondering if there is some sample code available for opening and viewing files that have been uploaded to the server
Via ngclient. I can see all the files in the .Servoy dir on the server, but this dir is not available via the application server it seems. I’m Interested on how others go about achieving this.
Many thanks in advance.
Phil

Sent from my ASUS_Z01KD using Tapatalk

Hi Phil,

‘Opening’ or rephrased: ‘Downloading’ files, can be achieved in different ways.
Easy way is using plugins.file.writeFile(‘docName’, Bytes);
Not huge fan of this because of how this is being handled in the backend.

More secure way is by handling this through an API, security can be achieved by using tokens in the download URL.

Viewing the document is a different thing.
A pdf is being handled nicely by most browsers, but other filetypes have to be determined.

In order to fully answer your question, a bit more background info is needed on type of files and how secure you’ll need things.