472,127 Members | 1,470 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

Files and Checksums

Rob
Good afternoon,

Is it possible to have JavaScript do a checksum of a file a user has
chosen to upload via a multipart html form? I'd like have JavaScript
do a checksum on the client side, embedded the result in the form, and
then have a CGI on the server check to ensure the server-side checksum
matches the client. Is such a thing even possible?

Thanks in advance for any advice.

Rob
Jul 20 '05 #1
1 2757
Rob wrote:
Is it possible to have JavaScript do a checksum of a file a user has
chosen to upload via a multipart html form? I'd like have JavaScript
do a checksum on the client side, embedded the result in the form, and
then have a CGI on the server check to ensure the server-side checksum
matches the client. Is such a thing even possible?


Part of your question is already mentioned in the FAQ:

<URL:http://jibbering.com/faq/#FAQ4_3>

Obviously, you'll need access to the filesystem to checksum the file.

On the other hand, what you describe is already provided for by HTTP. Look
into the Content-MD5 header:

<URL:http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.15>

I have no idea what browser support for this is like.
--
Jim Dabell

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Ricky Romaya | last post: by
12 posts views Thread by Ola Natvig | last post: by
reply views Thread by Missaka Wijekoon | last post: by
27 posts views Thread by Eric | last post: by
7 posts views Thread by RayAll | last post: by
6 posts views Thread by Steven | last post: by
8 posts views Thread by dagecko | last post: by
11 posts views Thread by MarkusR | last post: by
1 post views Thread by gdubois | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.