Is there any way to check if file has been uploaded completely on the server? My scenario: User uploads file over ftp and my other PHP task is running in cronjob. Now I would li
you can set a thread to get details using :
ll -h
and getting the size column and comparing it after a certain time interval if it stays the same for 2 or 3 time interval then the upload could be finished.
if you need a more precise solution and if you are looking for a more complicated way (but efficient) to do it, check this out :
http://www.php.net/manual/en/function.inotify-read.php
You can take a look at this example in the link I gave,
You will need to check for the event code IN_CLOSE_WRITE
Taken from : LINUX: how to detect that ftp file upload is finished