[thelist] Web-Based Hidden Image Optimization
M. Seyon
evoltlist at delime.com
Mon Jan 24 17:00:46 CST 2005
Message from Matt Warden (1/24/2005 04:10 PM)
>Rob,
>
>On Mon, 24 Jan 2005 09:23:48 -0600, Rob Smith <rob.smith at thermon.com> wrote:
> > > but you can't stop them uploading a large file in the first place.
> >
> > On the contrary...
> > from the form:
> > <form method="post" name="whatever" action="page.php"
> > enctype="multipart/form-data">
> > <input type="file" name="ProductPicture" size="12">
> > <input type="hidden" name="MAX_FILE_SIZE" value="4194304" />
> > </form>
> >
> > from the parsing page:
> > $disk_quota = mysql_result($results_file,0,"CustDiskQuota");
> > if (($_FILES['ProductPicture']['size'] + $disk_quota) >
> > $_POST["MAX_FILE_SIZE"]) {
> > unlink($uploaddir . $ProductPicture);
> > // where $ProductPicture = aboslute path to image itself
> > // stop right here; quota exceeded. delete if uploaded.
> > exit;
> >
> > :-) cool stuff
>
>Firstly, as someone has already pointed out, this doesn't keep them
>from uploading the file -- it allows you to delete it from temporary
>storage after it has been uploaded (meaning your bandwidth is still
>used).
Plus, the image is *already* there, but you're still going out of your way
to piss them off? After they've sat patiently at their computers with their
dialup connections, you arbitrarily delete their file and make them do it
again (thereby also consuming more bandwidth)?
The technology exists to solve the problem without ruffling feathers. Use it.
regards.
-marc
--
Trinidad Carnival in all its photographic glory. Playyuhself.com
http://www.playyuhself.com/
More information about the thelist
mailing list