How to know the file size in ftp in upload

0 votes
asked Jan 3, 2013 by Srinu (320 points)
edited Jan 4, 2013

Hi,

Is PutFile method can return the uploaded files size from FTP?

How can i speed up the upload and download process?

what is the purposes of UseLargeBuffers and MaxDownloadSpeed and MaxUploadSpeed ?

Regards Srinu

Applies to: Rebex FTP/SSL

1 Answer

0 votes
answered Jan 3, 2013 by Jan Sotola (16,920 points)
edited Jan 4, 2013

Yes, the Ftp.PutFile method returns "number of bytes transferred" which actually means size of the uploaded file.

The UseLargeBuffers option enforces FTP component to transfer data in bigger blocks. Switching this option on could speed up transfers in many situations, especially when working with larger files. On the other hand, large buffer size might cause problems at the client on very slow networks (like GPRS) where it takes a lot of time to send a block this large.

Please mind that the UseLargeBuffers option should be set BEFORE calling the Connect method.

The MaxDownloadSpeed and MaxUploadSpeed properties are used to limit the speed. So we recommend to keep them on their default value (zero = unlimited). All other values could slow down your transfers.

For more information about optimizing transfer performance see the separate article.

commented Jan 4, 2013 by Srinu (320 points)
edited Jan 4, 2013

Hi,

Thanks for your replay

Where can i write MaxDownloadSpeed and MaxUploadSpeed ?

After connection or some where elese ?

Regards Srinu

commented Jan 4, 2013 by Jan Sotola (16,920 points)
edited Jan 4, 2013

The MaxDownloadSpeed and MaxUploadSpeed properties can be set just before the file transfer operation (PutFile, GetFile, Upload, Download etc.)

...