You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Kandarp Desai <ka...@gmail.com> on 2009/08/14 01:19:10 UTC

Re: ASCII and Binary Modes for FTPServer

Thanks Niklas.
I don't find any function which returns the user mode(ascii or binary) in
ftplet User interface(in javadoc).
Can you please guide me how can I get that?

Regards,
Kandarp Desai

On Wed, Jul 29, 2009 at 12:57 AM, Kandarp Desai<ka...@gmail.com>
wrote:
> I want to disable ASCII mode for my ftpserver such that user has to use
> binary mode to transfer files to FTPServer.
> Can someone tell me which settings I should use? Thanks.

You could use a Ftplet that intercepts the commands for upload and
downloading and force a check of what mode the user is in. If he's
still in ASCII, return an error to the user.

/niklas

Re: ASCII and Binary Modes for FTPServer

Posted by Kandarp Desai <ka...@gmail.com>.
Yep. That helped.Thanks.

On Thu, Aug 13, 2009 at 4:39 PM, Sai Pullabhotla <
sai.pullabhotla@jmethods.com> wrote:

> You need to call FtpSession.getDataType() method to find out the
> current data type that is in effect.
>
> Hope this helps.
>
> Sai Pullabhotla
> www.jMethods.com
>
>
>
>
> On Thu, Aug 13, 2009 at 6:19 PM, Kandarp
> Desai<ka...@gmail.com> wrote:
> > Thanks Niklas.
> > I don't find any function which returns the user mode(ascii or binary) in
> > ftplet User interface(in javadoc).
> > Can you please guide me how can I get that?
> >
> > Regards,
> > Kandarp Desai
> >
> > On Wed, Jul 29, 2009 at 12:57 AM, Kandarp Desai<ka...@gmail.com>
> > wrote:
> >> I want to disable ASCII mode for my ftpserver such that user has to use
> >> binary mode to transfer files to FTPServer.
> >> Can someone tell me which settings I should use? Thanks.
> >
> > You could use a Ftplet that intercepts the commands for upload and
> > downloading and force a check of what mode the user is in. If he's
> > still in ASCII, return an error to the user.
> >
> > /niklas
> >
>

Re: ASCII and Binary Modes for FTPServer

Posted by Sai Pullabhotla <sa...@jmethods.com>.
You need to call FtpSession.getDataType() method to find out the
current data type that is in effect.

Hope this helps.

Sai Pullabhotla
www.jMethods.com




On Thu, Aug 13, 2009 at 6:19 PM, Kandarp
Desai<ka...@gmail.com> wrote:
> Thanks Niklas.
> I don't find any function which returns the user mode(ascii or binary) in
> ftplet User interface(in javadoc).
> Can you please guide me how can I get that?
>
> Regards,
> Kandarp Desai
>
> On Wed, Jul 29, 2009 at 12:57 AM, Kandarp Desai<ka...@gmail.com>
> wrote:
>> I want to disable ASCII mode for my ftpserver such that user has to use
>> binary mode to transfer files to FTPServer.
>> Can someone tell me which settings I should use? Thanks.
>
> You could use a Ftplet that intercepts the commands for upload and
> downloading and force a check of what mode the user is in. If he's
> still in ASCII, return an error to the user.
>
> /niklas
>