# Opening files from NG Client webclient

**URL:** <https://forum.servoy.com/t/opening-files-from-ng-client-webclient/20262>\
**Category:** Questions\
**Created:** [June 23, 2020, 11:19am UTC](https://forum.servoy.com/t/opening-files-from-ng-client-webclient/20262 "2020-06-23T11:19:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wvitpr](https://avatars.discourse-cdn.com/v4/letter/w/e0b2c6/32.png) [@wvitpr](https://forum.servoy.com/u/wvitpr)\
**Post date:** [June 23, 2020, 11:19am UTC](https://forum.servoy.com/t/opening-files-from-ng-client-webclient/20262/1 "2020-06-23T11:19:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [June 23, 2020, 11:47am UTC](https://forum.servoy.com/t/opening-files-from-ng-client-webclient/20262/2 "2020-06-23T11:47:47Z")

</div>

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.
