Check Image Size before Upload using form with two browse button.
I am using CGI.CONTENT_LENGTH to fetch the Image Size,but it is giving be the
total size of the images I am selecting from two browse button.I need the image
size of one selected by first browse button and second button seperalty. But
not able to find the code to check the Image Size seperalty through a single
form(with two browe buttons).
Can anybody help me out.
Azadi - 31 May 2007 15:30 GMT
not possible without uploading the images, i believe...

Signature
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Abinidi - 31 May 2007 16:44 GMT
Azadi is correct. You cannot do it prior to uploading.
Yet the folks over at ASFusion.com have put together a flash based upload form
that you can specify the max file size, and when the user is browsing for the
file, anything that doesn't meet the file size limit will not show up as a file.
http://www.asfusion.com/examples/item/file-upload-with-coldfusion-flash-forms
There may be a few AJAX solutions that you may be able to do something
similar, yet I don't know of any off the top of my head.
tclaremont - 31 May 2007 16:50 GMT
Keep in mind that CF is a server side solution. CF is not aware of the file
size until the file actually reaches the server.
Because of this, as alluded to above, a client side solution such as
javascript / flash, etc must be used in combination with CF to accomplish the
task.