[Phpwm] file upload complete?

Phil Beynon phil at infolinkelectronics.co.uk
Wed Jul 2 16:07:42 BST 2008


> We have zip files being uploaded to an FTP folder from various laptops.
> We then plan to open those files using a cron job. My concern is that we
> shouldn't try to open and process a file before upload is complete.
>
> Is it OK to just use  feof = true going to do this or do we need to be
> more thorough?
>
> Are there methods of monitoring a file to see when upload is complete
> and then switching on the next stage of the process?
>
> thanks, alan dunn

Are they being uploaded as native FTP or via a form submission from a page, 
in which case you can capture the upload size as a variable and use it to 
compare against.

There is a way with .zip files of ensuring their integrity and contents by 
parsing the file headers, I'm pretty sure this gives the file size in bytes 
/ embedded file names at creation point.


Phil 




More information about the Phpwm mailing list