Opening files from NG Client webclient

Forum to discuss the new web client version of Servoy.

Opening files from NG Client webclient

Postby wvitpr » Tue Jun 23, 2020 1:19 pm

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
Regards,
Phillip Routley

Worldview IT
Sydney, Australia
User avatar
wvitpr
 
Posts: 219
Joined: Tue Apr 24, 2007 1:38 am

Re: Opening files from NG Client webclient

Postby mboegem » Tue Jun 23, 2020 1:47 pm

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.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1748
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 2 guests

cron