mina-ftpserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Luc Pineault <pino_...@hotmail.com>
Subject RE: Advise the client that an error has occurred
Date Wed, 09 Mar 2011 18:15:02 GMT

Hi Toli
first, thank you to answer to my question as quick as you did. 
I just found a way to write something in the session but it's not easy to perceive.
FtpReply reply = new DefaultFtpReply(FtpReply.                        REPLY_550_REQUESTED_ACTION_NOT_TAKEN,
"*** WARNING *** : An error has occured when parsing the file.");pFtpSession.write(reply);

The best for us is to have something easier to see but I suppose that is specific to the FTP
Client application used.

From: tkuznets@marinsoftware.com
Date: Wed, 9 Mar 2011 08:16:57 -0800
Subject: Re: Advise the client that an error has occurred
To: ftpserver-users@mina.apache.org
CC: pino_115@hotmail.com

Have you tried throwing an exception form your onUploadEnd() function? 
You can throw and FtpException the file upload will error out, and (i believe) the message
will eventually show up in the client session.

Should be fairly easy to try and see if that's working for you. 

On Wed, Mar 9, 2011 at 6:40 AM, Pierre-Luc Pineault <pino_115@hotmail.com> wrote:


Sorry for the bas english that follows

I use my own DefaultFtplet and i have redefine onUploadEnd(). In this method, i parse a file
and if there is an error, the file is moved into an error file folder. This works perfectly
but now, i want to advise the client that an error has occurred with his file (Incomplete,
corrupted, ...).

How can i proceed ?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message