| From | Sent On | Attachments |
|---|---|---|
| Niklas Therning | Jan 12, 2009 7:27 am | |
| David Latorre | Jan 12, 2009 9:07 am | |
| Niklas Gustavsson | Jan 12, 2009 9:15 am | |
| Niklas Therning | Jan 12, 2009 11:14 am | |
| Niklas Gustavsson | Jan 12, 2009 11:35 am | |
| Niklas Therning | Jan 12, 2009 12:42 pm | |
| Niklas Gustavsson | Jan 12, 2009 1:23 pm | |
| Dan | Jan 12, 2009 2:37 pm | |
| David Latorre | Jan 13, 2009 1:59 am |
| Subject: | Re: Modifying STOR response on upload | |
|---|---|---|
| From: | David Latorre (dvl...@gmail.com) | |
| Date: | Jan 12, 2009 9:07:26 am | |
| List: | org.apache.mina.ftpserver-users | |
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 <nik...@trillian.se>
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





