Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO

Duration of file upload to CompleteFTP

0 votes
asked Jul 3 in CompleteFTP by ryansd (150 points)
I would like to get information regarding a file upload which I can then send off to another service for consumption by reports etc.

In particular I'd like to be able to get information on when an upload of a file started, when it completed, and the number of bytes transferred. I'd also like to know the number of bytes transferred if there was an error, and what the error was.

Is this possible with Complete FTP? I saw that there were events for when a file was uploaded, but the macros didn't have any start/stop time or error reason or anything.

1 Answer

0 votes
answered Jul 4 by support2 (143,330 points)
selected Jul 5 by ryansd
Best answer
Events are only triggered at the completion of an event. Process triggers can be written in Javascript so they are quite flexiible. You could write a script to tell you the size of the file, but you can't tell the number of bytes transferred or the error message (it would be useful if the error message could be supplied - I will check to see if that is on the planned features list.
commented Jul 5 by ryansd (150 points)
Thanks for your reply. Is there a way to determine how long the file took to transfer over?
commented Jul 10 by Admin (1,850 points)
Yes, this can be done programmatically by storing the current time before the transfer begins, the time after it completes, and then calculating the difference between the two.
commented Jul 10 by ryansd (150 points)
You mean from a client? The need I would have would be on the server itself. In the logs you can see when an upload, started, and the number of bytes transferred. But I was wondering if there was a way via a CompleteFTP extension, to get at the start and end time of an upload?
commented Jul 11 by Admin (1,850 points)
Actually, my answer wasn't correct in this context.  Since process triggers are only executed at the end of the transfer it's not possible to get the start time.  However, it can be done in the more powerful JSS file-system extension, which is available in the Enterprise Edition.  You can read more about these at http://enterprisedt.com/products/completeftp/doc/guide/html/jssfilesystemextensions.html