[Javascript] Resizing images client-side

Rakesh Pai rakeshpai at gmail.com
Fri Jul 13 15:07:11 CDT 2007


Agreed, Hassan... Terry, there's no way anything can determine the
file size until it has access to the complete file. There's no
standard headers to a file to read from.

And tedd, in a similar vein, there's no way you can be sure of the
file size. You could use ActiveX (maybe Java or Flash, but I've never
used those) to find out before-hand, but you limit that code to
MS/Java installed/Flash installed clients, as everyone's pointed out.
So ultimately, you cannot do away with a reliability check on the
server.

If I were you, I would implement an ActiveX based solution to trap the
issue on the client when possible, and then check on the server
anyway.

That's my 2 cents.

On 7/14/07, Hassan Schroeder <hassan at webtuitive.com> wrote:
> Terry Riegel wrote:
>
> > PHP only knows about the files after they are uploaded. This is why upload
> > scripts are usually either ASP or PERL.
>
> ? And through what mystical process would a program written in *any*
> language running on a remote server peek into the file system of the
> user's machine and determine the file size *before* it's uploaded? :-)
>
> --
> Hassan Schroeder ----------------------------- hassan at webtuitive.com
> Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
>
>                             dream.  code.
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>


-- 
Rakesh Pai
Mumbai, India.
rakesh.pai at gmail.com
http://piecesofrakesh.blogspot.com/



More information about the Javascript mailing list