Write a file in the Server Side

Hi All,

I have a saved file in a db table blob field. Via smart client I want to write this blob field back to a file, in the specified location in the server. Via the Smart Client it seems not possible, because finds the specified location in the local machine. Can someone direct me to a possible way of doing this please ?
:cry:

Regards,

Hi dacrawinath.

Read this topic.

http://forum.servoy.com/viewtopic.php?f=22&t=13477

Best regards. Roberto

I know that RMI is covered in that topic as well, but just to reiterate, it would really be a nice feature of the existing Servoy file plugin if it had a writeFileOnServer method that streamed the file from [smart] client to the server via RMI/(IO).

Maybe there is hope for this? (with and without tunneling enabled)

jbader:
I know that RMI is covered in that topic as well, but just to reiterate, it would really be a nice feature of the existing Servoy file plugin if it had a writeFileOnServer method that streamed the file from [smart] client to the server via RMI/(IO).

Maybe there is hope for this? (with and without tunneling enabled)

AND viceversa!

+1

AND viceversa!

Browser sandbox will prevent server from writing files to arbitrary locations on the client except via a download action, via the browser. But right now (5.1) the file plugin’s write file method can push a file to the client so that functionality is mostly there. Current trouble though is that the file plugin won’t let you specify a MIME type, so there is room for improvement.

I have a ticket in for this already.

Thanks for the vote! :D

how would you specify a target dir (filename) on the server?

Would the file plugin have to be configured somehow in the admin pages so that the server side knows in what dir it can write the files in
and then every file you put over the line is relative to that one?

if you dont do that then it is not very write once run everywhere because installs of servoy can be on completely different servers and/or operating systems.

That would work just fine for me. Server plugin property to specify a default path.

Or do it the usermanager plugin way:

this: plugins.UserManager.getServerFile(String filePathOnServer)

will return a JSFileObject ON the server.
Ofcourse the developer is responsable to give a start point, (which indeed can be different per server)[attachment=0]Schermafbeelding 2010-05-27 om 13.25.53.png[/attachment]

Important for us is, that we can upload a (large) file in background to the server AND fire a method, when the upload is done.
that we can download a (large)file in background from server AND fire a method when the download is done.

AND that this works also over tunneling and stuff like that, that’s the problem right now, with the userManager plugin… :-(