[Phpwm] file upload complete?

alan dunn alan at dunns.co.uk
Wed Jul 2 16:44:31 BST 2008

the files are coming in via FTP, they are not being posted from a form.

Here is the solution your thoughts have triggered:
the application uploads the zip file (say) 765-5.zip. when that is 
complete it sends an empty file called 765-5.end

Our Cron job looks for ****.end files. When we find one, use the 765-5 
to go and look for the appropriate zip file.

Seems pretty safe -  somebody shoot us down!

Thanks for your input, alan dunn

Phil Beynon wrote:
>> 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
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm



This document originates from within Dunns Imaging Group Limited.
This message, together with any associated files, is intended only for 
the use of the individual or entity to which it is addressed and may 
contain information that is confidential, subject to copyright or 
constitutes a trade secret. If you are not the intended recipient of 
this communication you are hereby notified that any dissemination, 
copying or distribution of this message, or of any files associated with 
this message, is strictly prohibited.
If you have received this message in error, please notify us at once.

Dunns Imaging Group Ltd.
Registered Office: Chester Road Cradley Heath West Midlands B64 6AA.
Tel: 01384 564770
Registered in England 598527.

More information about the Phpwm mailing list