General questions - WeOnlyDo Discussion board

General questions (General questions)

by MJLeaver, Wednesday, January 05, 2011, 09:23 (5072 days ago)

Hi,

We're currently looking to switch to this FTP component from one of your competitors ;) So far, so good, but I've got some quick questions:

Is there a way to force LIST to be used even if FTP server supports MLST? We've come across FTP servers in the past that have broken implementations of MLST so we want to use LIST instead in some cases.

When MLST or LIST is called, the component uses ASCII mode even when I've set it to Binary mode. We need Binary mode because we want the actual size of the file. I can change the command in the PreTranslateCommand command, but is there an easier/better way? I want to switch to binary mode and leave it in binary mode.

When retrieving a file it sends superfluous commands, i.e. switches to binary mode (even if when it's already in binary mode),
and it changes the current directory (even when it's changing to a directory it's already in). I've already set SmartGet and SmartPut
to FALSE, but it still sends these commands. I need to reduce the number of calls to the FTP server (for performance reasons), so how
can I stop it sending these commands?

Thanks!

Re: General questions

by wodDamir, Wednesday, January 05, 2011, 10:22 (5072 days ago) @ MJLeaver

Hi,

By default, if MLST is available on server, component will use it instead of LIST. As you already noticed, you can simply use PreTranslateCommand and switch to using LIST.

As for using Binary mode along with listing directories, I'm not sure how file size is related to transfer mode in which listing is requested. The file size is provided by server in raw listing. Does any client do that? I quickly checked some clients and they all do listing in ASCII, although Transfer mode is set to Binary.

Regarding the TYPE I being sent on each file transfer, I'll have to check this out with our developers if we can make these changes.

Regards,
Damba

Re: General questions

by MJLeaver, Wednesday, January 05, 2011, 10:33 (5072 days ago) @ wodDamir

Hi,

By default, if MLST is available on server, component will use it instead of LIST. As you already noticed, you can simply use PreTranslateCommand and switch to using LIST.

As for using Binary mode along with listing directories, I'm not sure how file size is related to transfer mode in which listing is requested. The file size is provided by server in raw listing. Does any client do that? I quickly checked some clients and they all do listing in ASCII, although Transfer mode is set to Binary.

Regarding the TYPE I being sent on each file transfer, I'll have to check this out with our developers if we can make these changes.

Regards,
Damba

Re: General questions

by MJLeaver, Wednesday, January 05, 2011, 10:37 (5072 days ago) @ MJLeaver

Sorry about the previous post. The reply got screwed up.

By default, if MLST is available on server, component will use it instead of LIST. As you already noticed, you can simply use PreTranslateCommand and switch to using LIST.

The problem with that is that I can no longer get the results from DirItems and so need to parse the results myself. There doesn't seem to be any method that can do the parsing for me (as it would if it had sent a LIST command itself).

As for using Binary mode along with listing directories, I'm not sure how file size is related to transfer mode in which listing is requested.

The file size is definitely related to the transfer mode with the FTP servers some of our clients have used in the past. If you use ASCII mode then the size of a file may be returned as the ASCII size and not the actual real size. If BINARY mode is used then they will all always return the actual real size of the file. We know for sure that some FTP servers will return a different value for the SIZE command based on the transfer mode.

Re: General questions

by wodDamir, Wednesday, January 05, 2011, 11:01 (5072 days ago) @ MJLeaver

Hi,

In that case, why not simply removing the MLST from FEAT response in PreTranslateReply?

This will cause component to send LIST automatically.

I'm aware of these issues. However, ASCII is always used when listing directory contents.

Regards,
Damba

Re: General questions

by MJLeaver, Wednesday, January 05, 2011, 11:44 (5072 days ago) @ wodDamir

In that case, why not simply removing the MLST from FEAT response in PreTranslateReply?

Because I didn't know you could do that :) I've tried that and it worked perfectly. Thanks!

Re: General questions

by woddrazen, Thursday, January 06, 2011, 00:38 (5071 days ago) @ MJLeaver

Hi,


Unfortunately we cannot make changes inside TYPE command. If we do that, that could produce some non expected problems and component could stop to work as expected.

You cannot make LIST inside binary mode because server will probably ignore this.


Drazen