[thelist] Web-Based Hidden Image Optimization

Rob Smith rob.smith at THERMON.com
Mon Jan 24 09:23:48 CST 2005

> you can do that with either Imagemagick or the GDI libraries in PHP
> http://www.imagemagick.org/
> http://uk.php.net/gd

Cool! I'll have to check that out.

> 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"
<input type="file" name="ProductPicture" size="12">
<input type="hidden" name="MAX_FILE_SIZE" value="4194304" />

from the parsing page:
$disk_quota = mysql_result($results_file,0,"CustDiskQuota");
if (($_FILES['ProductPicture']['size'] + $disk_quota) >
  unlink($uploaddir . $ProductPicture);
  // where $ProductPicture = aboslute path to image itself
  // stop right here; quota exceeded. delete if uploaded.

:-) cool stuff


More information about the thelist mailing list