mina-ftpserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Latorre <dvl...@gmail.com>
Subject Re: IODataConnection.getDataInputStream()
Date Wed, 14 Oct 2009 08:28:05 GMT
2009/10/13 Niklas Gustavsson <niklas@protocol7.com>:
> On Tue, Oct 13, 2009 at 6:21 AM, Charles Karow <charles@karow.com> wrote:
>> I am using ftpserver to provide a standard way for people to upload files to
>> a "bucket" on Amazon's S3 service. My users will always be uploading files
>> in binary mode. I am using code from Amazon that takes an InputStream and
>> uses it to stream the data to Amazon's servers. Amazon's code does not
>> expose an OutputStream.
>> transferFromClient takes an OutputStream and I do not have access to an
>> OutputStream.
> Sounds like this could be solved by an adapter stream which gets
> written to by DataConnection and is read by S3. Or I might be missing
> something?

 This is I what I first thought but I think this might imply  several
risks in terms of performance, or the need to store the whole
transferred file locally (be it in memory or disk). This is of course,
if he cannot use PipedStreams.

I may not be thinking correctly now but for a solution:

-  If you are using different threads for the FTP transfer and the
transfer to Amazon I guess you could use PipedStreams with our current
code (I haven't looked at it actually).

 - Otherwise, maybe someone on this list can tell us what their
approach is. I think some of them are using S3.

If no one comes up with a solution for this, i don't think we should
dismiss the possibility of exposing the input stream,  what do you
think niklas?

View raw message