Hi Niklas, Thanks for the suggestion. Coming back to the implementation of reading the file in transfer; do you think the following will be a workable solution.
IODataConnection dataCon = (IODataConnection)session.getDataConnection().openConnection(); //modify IODataConnection.java to get the socket channel for this DataConnection SocketChannel sc = dataCon.getSocketChannel(); sc.read(ByteBuffer); I would appreciate if you could give me a better implementaion solution - a quick overview/idea would do. I really appreciate your time. Thanks much Ajith -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Niklas Gustavsson Sent: Wednesday, May 23, 2007 3:33 PM To: ftpserver-dev@incubator.apache.org Subject: Re: Ftplet upload file question Janardhanan, Ajith (AJANARDH) wrote: > Hi Niklas, > Thank you very much for the response. If you could consider the > feature to read the file in transfer from an Ftplet, that definitely > would be great help. > > If I wait till the user has uploaded the complete file, there is a > possibility of multiple users doing the same file name. > I hacked the sorcecode for IODataConnection.java and created an > InputStream and am currently reading from it and closing the stream > after read. It is working , but do you foresee any issue if I do it > that way? One obvious problem is that it would not work with the MINA based listener as it would not be useful to create a blocking stream there. If we provide something in the Ftplet interface it would probably be byte array or ByteBuffer based. /niklas