Hello Niklas,
 As you said , you cannot use onUploadEnd for that so your only chance is to
handle the transfer yourself. I see two options here:
 1) Use onUploadStart() bypassing the STOR  command.
 2) Implement your own STOR command.

 For 1/, take a look at
http://mina.apache.org/ftpserver/faq.html#FAQ-HowcanIsendbinarydatastoredinadatabasewhentheFTPServergetstheRETRcommand%253F.<http://mina.apache.org/ftpserver/faq.html#FAQ-HowcanIsendbinarydatastoredinadatabasewhentheFTPServergetstheRETRcommand%253F>

Of course you could  find a different way depending on your needs but these
two are the easiest/safest.



2009/1/12 Niklas Therning <[email protected]>

> Hi,
>
> I'm trying to intercept file uploads and send the uploaded files to a
> backend server which does some processing. If the processing fails I'd like
> to return a negative response to the STOR command sent by the client. Is
> that possible? I don't think I can do this in onUploadEnd in an Ftplet since
> when that method is executed the positive response has already been written
> to the client. Any ideas?
>
>
> Regards,
> Niklas
>
>

Reply via email to