[thesite] [BUG] Author pic deleting?

mrg mrg at members.evolt.org
Mon Jan 14 12:05:00 CST 2002


> From: ".jeff" <jeff at members.evolt.org>

> same here -- constantly.

Thanks for confirming that it's not just me.

> i'm simply checking
> the trimmed length of the file upload field's value.  if it's greater than 0
> i delete the existing pic and upload the new one (or try, it seems).

Yep, there's the problem i think - since IE still gives that field some
value like "c:\windows\temp" when the form is submitted without a file. It's
got a length > 0 regardless. What occurs to me is the possibility of
uploading the "file" to the server with a different/temporary name, then
testing the filesize of the uploaded file. If that file is larger than x
(some piddly little number), then rename the file to replace the old one.

Don't know if that can be  done on one page, or if it's a 2-step thing.
anyway, it's worth thinking about.

i might have a look at that with one of my sites in the next couple of days.

i'll let you know if i come up with anything.

matt g.

More information about the thesite mailing list