By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,910 Members | 1,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,910 IT Pros & Developers. It's quick & easy.

HTML FILE UPLOAD VALIDATION

P: n/a
Hi all,

How can we calculate and send a checksum of a file we are uploading
via HTML FORM? I suspect we cannot do it in JavaScript because it does
not have access to the file for security reasons. Is there a way to
force the browser to do the checksum (CONTENT-MD5 header, perhaps?)?

Also, is there ANY inherent guarantee (protocol-level implenetation)
that the file arrived at the server without corruption?
Thanks!
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Alejandrina wrote:
...
Also, is there ANY inherent guarantee (protocol-level implenetation)
that the file arrived at the server without corruption?


No guarantees, but ... have you considered the use of SSL or PGP?

--
William Tasso - http://WilliamTasso.com
Jul 20 '05 #2

P: n/a
In article <2a*************************@posting.google.com> , one of infinite monkeys
at the keyboard of ap*****@iname.com (Alejandrina) wrote:
Hi all,

How can we calculate and send a checksum of a file we are uploading
via HTML FORM?
Can't.

A signed Java applet could do the job if your users will accept it.
But if it's a WWW audience, you'd be better off supplying a separate
form for the user to enter a checksum, and offering instructions for it.
I suspect we cannot do it in JavaScript because it does
not have access to the file for security reasons.
Yep, security is the issue with any technique.
Is there a way to
force
No.
the browser to do the checksum (CONTENT-MD5 header, perhaps?)?


Ah. That would be legitimate. You could perhaps offer browser patches
and/or write to browser developers. You'd still have to explain about
the patches to your users. We have folks on ciwah who could hack it for
(at least) Mozilla and MSIE.

--
Nick Kew

In urgent need of paying work - see http://www.webthing.com/~nick/cv.html
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.