SV: Testing for complete uploaded file
Carsten Gehling
carsten at gehling.dk
Tue May 27 17:09:41 EDT 2003
> Fra: python-list-admin at python.org
> [mailto:python-list-admin at python.org]Pa vegne af Peter Hansen
> Sendt: 26. maj 2003 16:15
<snip>
> Scan periodically and consider a file to be fully uploaded only once its
> size stops changing? (With appropriate extra delays for safety.)
I thought about this one too, it's a bit tricksy (as Gollum would say). It
involves keeping a size table for the files. Perhaps in a dictionary with
the full pathname as the key?
> Or check a log file to see when a file upload has completed.
This might be a better solution. After a bit of research, I found that
ProFTPD doesn't log an upload until it is complete, so this could be of use.
> Or use an FTP server written in Python, and modify it to notify the
> daemon when the upload has completed.
Can't do this one - the hosting company insist on proftpd.
- Carsten
More information about the Python-list
mailing list