jcompagner wrote:ah ok its the other way so from server to client.
That doesn't work currently with the file plugin because it expects bytes
We could add support that you can say stream this (temp) file to the user.
But streaming colunm, so database content, is another matter, currently if you touch a blob column that column will be completely loaded, we currently have no way of streaming that from the database to a client (and then stream that through to a file on the clients hd)
For servoy itself this would result in quite a big change, because you have to have an open result set and connection to the database from the client until it is streamed, and you need some handle to it that represents this output stream..
I guess something like this could be made by a plugin that has some method like getOutputStream(server,table,pk,column) and that output stream needs to be given then to an enhanced file plugin.
Streaming from a file on the server to the client (both Smart and Web) should definitely be in the File plugin. I guess the same applies for "streaming" data from the client to a file on the server.
I agree with you that for streaming data to/from the database in a media column a separate plugin (or perhaps new methods in the current File plugin) will work best. In the case of streaming a file from the web client all the way to the database will involve two "hops" - the first one to stream the data in chunks from the client to a temp file on the app server and then streaming the temp file from the app server to the database.
I understand that this type of implementation is a bit more complex but when it comes to dealing with files, I believe it is the only proper way of handling them since we have no control on how big files the end user will be pushing around.
Let me know if I need to create a feature request for this.