[ic] Extended Value Access and File Upload

interchange-users@interchange.redhat.com interchange-users@interchange.redhat.com
Tue Apr 23 19:12:01 2002


On Tue, Apr 23, 2002 at 03:57:05PM -0500, Ryan Hertz wrote:
> At 12:45 PM 4/23/02 -0700, Paul Jordan wrote:
> >> Extended Value Access and File Upload: Is it possible to limit
> >> the file size
> >> to say... 50K?
> >>
> >> I checked everywhere, can't find info on this...
> >>
> >> Jim Webster
> >>
> >
> >Maybe the a completed upload could trigger a cron, or you can run a cron to
> >clean up files in a certain dir over a certain size limit. Not the most
> >automatic though.
> >
> >Paul
> 
> I know that there isn't a method of limiting the size of the upload via the 
> browser/form.    That is, I believe you don't know how big it is until it's 
> done.   If it comes in as a multipart/form-data post I believe you will 
> have a contentlength in the headers, otherwise you could check the length 
> of the data.  Besides that, you can limit the maximum size of a 
> multipart/form-data post through your webserver configuration if you're so 
> inclined.
> 
> But I think you should allow up to a few megs or so and pipe it through 
> Gimp to resize/downsample automatically if > 50k.    That'd be much 
> cooler.  While you're at it, if you start using Gimp, you could make 
> dynamic image buttons that display the customer's first name, like "Ryan's 
> Store" and....  huh... oh?  Right, Amazon already did that?  It's not 
> patented, is it?.....Dang.


You want imagemagick/convert not gimp.  Set a bounding box and
scale approprately.  There are also perlmagick libraries.


> 
> -Ryan
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users

-- 

Christopher F. Miller, Publisher                               cfm@maine.com
MaineStreet Communications, Inc           208 Portland Road, Gray, ME  04039
1.207.657.5078                                         http://www.maine.com/
Content/site management, online commerce, internet integration, Debian linux