Jump to content


Photo

APPE


  • Please log in to reply
4 replies to this topic

#1 Balch

Balch
  • Members
  • 3 posts

Posted 08 August 2005 - 06:36 PM

Hello,

I am evaluating the SmartFTP Library and so far I am impressed. I am trying to upload and append a file using the APPE command. So far I have not found the proper calls.

Please let me know how to accomplish this.

Thank you,

Balch

#2 Balch

Balch
  • Members
  • 3 posts

Posted 10 August 2005 - 01:26 PM

26 views and no reply?

Please let me know if I am missing something obvious.

Thank you,

Balch

#3 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 10 August 2005 - 01:50 PM

APPE is currently not implemented because I've not encountered any situation so far where it would be better to use APPE instead of REST.

Why do you want to use the APPE command?

-Mat
SmartFTP

#4 Balch

Balch
  • Members
  • 3 posts

Posted 10 August 2005 - 04:38 PM

Thank you for responding.

We have an application that consumes files off an FTP server for to sync with our database. Our client application appends new data to files already present on the FTP server. We want to update our functionality to use Secure FTP. We are currently evaluating several FTP libraries and I like what I see with SmartFTP, except that fact the I cannot use APPE which our current implementation uses.

Please let me know if there is a way to accomplish this with the REST command.

Thank you,

Jay Balcher

#5 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 10 August 2005 - 08:16 PM

Hello ..

SIZE is the more reliable way to resume a transfer. Why? Because you can exactly specify the position where data gets appended to the existing file on the server (in case you are uploading).

APPE just starts appending everything at the end of the existing file. If this is what you intend to do, you can achieve the same result a REST, STOR combination:

REST <file size of existing file>
STOR <file>
is semantically equal to:
APPE <file>

In both cases you need to get the <file size of existing file> by either sending a SIZE <file> command or by extracting the file size from the directory listing.

If you are using the UploadFile(local file, remote file, startpos) or DownloadFile(local file, remote file, startpos) functions provided by the SmartFTP FTP Library, REST is automatically sent if the startpos is greater than 0.

Regards,
-Mat




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users