On Mon, Aug 25, 2008 at 11:26 AM, mobic.com <[EMAIL PROTECTED]> wrote: > I must admit that I have not studied the implementation of MINA ftp in > detail, so I will rather describe our need. > > Our intent is to store a file as a blob directly in a database, not using > the file system. A very quick implementation is this one line code: > > Hibernate.createBlob(inputstream) > > This requires access to the data as an inputstream. > > To get access to the stream we have created our own STOR command, and we > then have to convert the outputstream to an inputstream to be able to use > the Hibernate util. > > With the current implementation of the IODataConnection it seams very simple > to get access to the inputstream. If you intent to change the design this > might be another case. If so, please evaluate our need and implement a > proper solution. Store data directly into a database will be a very > important usage of an embedded MINA ftp server. > > Please tell if you have better ways of using MINAftp for storing files > directly into a database.
The "normal" way of doing this would be to create a custom file system implementation. That way, your storage would work with any of the FTP commands, like listing or any of the storage commands (STOR, STOU, APPE). I would like to have a plain JDBC based file system implementation as part of the project. /niklas
