ahh the limitations of technology. who knew that flash would be the
solution? what an unlikely bedfellow.

On Wed, Mar 5, 2008 at 1:40 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

>
> Hi all,
>
> I've had lots of run-ins with this sort of problem - lol - and
> basically ...
>
> 1: PHP cannot determine anything about a file until it has it on the
> server
> 2: Javascript can create an object, and fill it, and then check the
> size BUT the file also needs to be on the server
>
> which just leaves Flash - which kind of does the same thing, it uses
> actionscript to 'replace' the contents of a movie clip with the image
> and then waits till its loaded and then asks how big it is
> (dimensions). Flash is the only known way to get any dimension related
> information from an image before it is uploaded.
>
> What most people do is let clients upload an image and then use php to
> delete it (or GD library to modify it) if it doesnt meet your
> criteria. Unfortunately this means that clients can still innocently
> upload a HUGE image straight off their camera etc and have to wait for
> the upload process to complete before you can let them know it was all
> for nothing :-(
>
> Since flash can talk to javascript, the best way is to write a generic
> flash file that javascript can call - get the dimensions and report
> back to js - and then relay any information necessary to the client or
> upload the file.
>
> Hope this helps
>
> On Mar 5, 3:13 pm, Hamish Campbell <[EMAIL PROTECTED]> wrote:
> > File size or dimensions?
> >
> > On Mar 4, 4:25 pm, Xinhao Zheng <[EMAIL PROTECTED]> wrote:
> >
> > > hi all,
> >
> > >     is there a way to do this that can work both under ie and
> FF.thanks
> > > in advance.
> >
> > > George
>

Reply via email to