Is plugins.file.showDirectorySelectDialog web compatible?
I can get this to work in WC and SC in developer, but only in SC in production. The Directory Select Dialog doesn’t appear in WC.
I want to read contents of a folder on a CD on the client’s machine.
if (globals.isMac())
{
var folder = plugins.file.showDirectorySelectDialog('/Volumes/');
}
else {
var folder = plugins.file.showDirectorySelectDialog();
}
in the web you can’t select a directory on the client, so no that dialog is not web compatible.
Thanks Johan, I was hopeful when I found that it works in WC in developer, but there client and server are on the same machine.
Can you suggest a way to achieve this? I want the client to be able to point to a folder on a CD so we can programmatically move some files to the server.
The Wiki suggests that this is a current limitation. Does that mean it might be possible in the future?
http://wiki.servoy.com/display/public/DOCS/file
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.
no that is also not possible in the future…
A user can only one file and only the file itself, you can’t select a directory on he client and then upload all the files in that dir to the server.
Thats impossible, we don’t have access to that dir. If you want these kind of things use the smart client
To elaborate on Johan’s comment: It’s a restriction of browsers, not one that we apply to the Web Client.
Maybe such a thing will be possible in browsers in the future, but for not browsers just restrict it. The standard bodies that govern the web are looking into a File API in browsers, so maybe the future holds something nice.
Paul
Thanks Paul and Johan, I understand that this is not a Servoy limitation. I was merely hopeful. I will work with SC for this function.