0

We have a process in place built on Excel VBA that uploads a file to FTP Server. On the other side, our client downloads it. Very randomly, they complain that the file they received is blank (the file name is the same though). We then check at our end and see that the file that was uploaded was never blank. So here comes the problem: we're always arguing whether it was our error or theirs.

I figured that there might be a couple of reasons behind it but I have a few questions to ask before coming to conclusions:

  1. If, say, the file was never uploaded (a possibility), what happens when the client runs a download process at their end? Can that download process generate a blank file with the same name as our output file? It sounds impossible to me but since the client is following up on this issue, I have to ask this silly question.
  2. How does the mechanism work - what are the steps that happen on FTP server the moment my process completes uploading the file? I sometimes see that as soon as I upload the file, a 0kb file is created and then a second later (or less) the file with right size appears? Could it be possible that their process is running right before this actual file creation?

Thank you in advance for your help!

bagatov
  • 5
  • 3
  • Since you post no code or other details, there's not much for us to go on here. If you want to confirm that your upload process didn't generate a zero-length file, then you could consider re-downloading the uploaded file to confirm its size is non-zero. – Tim Williams Jul 29 '16 at 23:10
  • ...or instead of downloading the file, just query the size from the FTP server you uploaded to (add a wait so you can be sure the process is complete). For your Q1 - requesting a non-existent file from an FTP location should raise an error, and not generate a zero-length file. – Tim Williams Jul 29 '16 at 23:23
  • Thank you very much Tim for answering Q1. Querying size sounds good - I'll make sure I put a lag before it is done. If that doesn't work, I'll post the code on Monday – bagatov Jul 30 '16 at 05:33
  • Sorry I never got back - I implemented file size query per your suggestion and it works beautifully now. – bagatov May 09 '17 at 21:14

0 Answers0