How to know file size before upload in web?

I have a file upload control in a form, I need to know the size of the attachment before upload.

thanks in advance

Subject: How to know file size before upload in web?

You’ll need a java applet or activex object to do that as the browser security doesn’t allow the upload control to return the size. Search this forum for upload and size to see previous responses to the same question.

Subject: RE: How to know file size before upload in web?

Thanks for response. I can’t use a applet for this job, and I saw the code for the activex object and I tried it, but the IE shows a alert message. Is there more ways to know file size before upload?

Subject: My same answer stands, not unless you use Java or ActiveX

The warning error is what you expect, as you’re performing an operation on the local machine, so you need to be trusted. Signed ActiveX and Java can avoid the warning if the signature is trusted.

Subject: RE: My same answer stands, not unless you use Java or ActiveX

OK, I’ll try to sign the ActiveX control.

Thanks for all :wink: