Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
October 12, 2004, 1:00 pm
rate this thread
the image. Only the image will be partially gray.
So, can I determine with a php-function if an image is fully uploaded on the
server and without checking the filesize using an interval in time?
To be completely clear : this isn't about http-upload, but about uploaded
files with external ftp-software.
Thanks in advance!
Re: check if image is partially uploaded with ftp-software
I'm not sure, but see if the Image functions that load image files
(imagecreatefromjpeg, imagecreatefromgif, imagecreatefrompng, and so
on) will return error codes on truncated image files. If they do,
just figure out what format the image was supposed to be in, try to
load it, and see if it works.
If not, I suspect you'd have to investigate image-format-specific
routines (i.e. roll-your-own JPEG checker, roll-your-own GIF checker,
and so on, which might not be too hard if you only use one or two
formats, but which would require you to understand the image formats
Alternatively, if you're the only one uploading files, maybe you could
set something up so that partial files don't stay lying around
(either the server or the client sets some option to delete them if
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
-----END PGP SIGNATURE-----