Hi,

I have this program that would upload files from the client to the server,

Now I want to validate the filesize before uploading it into the server..

How can I create this kind of validation? Also I need to track the progress of the upload.

Thanks.

Member Avatar for diafol

I don't think that's possible. JS shouldn't be able to check files on the client do to security issues. From what I gather, IE may allow this via ActiveX object when security level is set to medium or below. That was a while ago, I'm not sure whether things have changed since.

HTML5: http://stackoverflow.com/questions/4112575/client-checking-file-size-using-html5 (but not universal)

Maybe flash could help?

Like this:

http://demo.element-it.com/Examples/multipow/index.htm

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.