[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Extended Value Access and File Upload
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.
-Ryan