file plugin in web client

Hi all!

Does the file plugin methods works in web-client?

i.e.

controller.newRecord();
blob_field = plugins.file.readFile(client_file_path);
databaseManager.saveData();

it works in developer mode (client and server are in the same machine) but fails when application is deployed in a a remote server.

Best regards. Roberto.

Have a look at http://wiki.servoy.com/display/public/DOCS/Servoy+5.1 under “Client Compatibility”

Thanks michael.

I forgot to say I’m working with 4.1.7 Servoy version.

Best regards. Roberto.

Roberto Blasco:
Hi all!

Does the file plugin methods works in web-client?

i.e.

controller.newRecord();

blob_field = plugins.file.readFile(client_file_path);
databaseManager.saveData();




it works in developer mode (client and server are in the same machine) but fails when application is deployed in a a remote server.

**Best regards. Roberto.**

When running web client the javascript will be executed on the server. This is why it only works when the server and client are on same machine. What do you want to achieve with that code ? How would you know a correct client file path ? Wouldn’t it make more sense to use a server path ?

Hello lvostinar

I need to use this kind of functions to import files from the client side to the database.

I’m gonna use an applet to take the client path and a jsp to upload the files to the server, processing them with a batch job.

Best regards. Roberto Blasco.

in 5.1 you can just do that by asking for hte showFileDialog method…
Then you will get in your callback function the files that the user did select and upload.
then you can ask JSFile.getBytes() for the content of that file.

Hi jcompagner

I have to work with Servoy 4.1.7 because of my job, so I resolved it using this applet with amazing features !!! :D :D

http://jumploader.com/

Best regards. Roberto.

Hi Roberto,
Are you using it as a servoy plugin??
It would be nice to call it from a servoy solution.

Regards