plugins.file.readfile() issue in Ngclient

Forum to discuss the new web client version of Servoy.

plugins.file.readfile() issue in Ngclient

Postby patrick1569617634 » Tue Jun 23, 2020 8:01 pm

in NgClient

plugins.file.readFile() results in the below exception

java.lang.NullPointerException: null
at sun.awt.shell.Win32ShellFolder2.access$200(Unknown Source) ~[?:1.8.0_141]
at sun.awt.shell.Win32ShellFolder2$1.call(Unknown Source) ~[?:1.8.0_141]
at sun.awt.shell.Win32ShellFolder2$1.call(Unknown Source) ~[?:1.8.0_141]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_141]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:1.8.0_141]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:1.8.0_141]
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source) ~[?:1.8.0_141]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_141]

in the Servoy Configuration,
servoy.FileServerService.defaultFolder = C:\.servoy\uploads\GUID
I've verified that tomcat is running under the SYSTEM account and SYSTEM has full control of the folder

What am I missing?

Thanks,

-patrick
patrick1569617634
 
Posts: 6
Joined: Fri Sep 27, 2019 10:53 pm

Re: plugins.file.readfile() issue in Ngclient

Postby Joas » Tue Jun 30, 2020 3:22 pm

plugins.file.readFile() without argument is not supported in the NG-client.

Do you want the user to upload a file? Then you should probably use
Code: Select all
plugins.file.showFileOpenDialog(callbackFunction)

The callbackFunction is called when the user is finished with the dialog and gets an array of JSFiles as argument.
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 6 guests