-1

I get STOR (store) commands and APPE (append) commands.

The STOR might upload a complete file.

But it might be just part of a file, the rest comes later with multiple APPE commands.

How do I know when a file is really 100% uploaded?

Andrew Arrow
  • 4,248
  • 9
  • 53
  • 80
  • 1
    AFAIK, the client is free to append at any time, so unless you wrote, or have intimate knowledge of, the client, you can't really tell on the server. – Mark Setchell Mar 31 '16 at 21:33
  • is there like a standard timeout then? Do I wait 30 mins? or 3 hours? – Andrew Arrow Mar 31 '16 at 22:06
  • The question does not make sense. If you have a random file locally on a file system. How do you tell that it is complete? You do not. There's no way. And it's the same for FTP. – Martin Prikryl Apr 01 '16 at 06:12
  • oh c'mon Martin, the question makes more sense than your example. In an FTP situation I need to process a file after it's been uploaded. I need to know when the user is done sending all the bits. – Andrew Arrow Apr 01 '16 at 14:50

1 Answers1

3

How do I know when a file is really 100% uploaded?

There is only end-of-transfer in FTP and not end-of-file. Commonly STOR is to used to transfer complete files and APPE is only used if the previous STOR broke somehow - but you never can be sure. If you need to be sure you have to built your own signalization for a finished file.

Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172