473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 2798
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ricky Romaya | last post by:
Hi, I'm working on a file upload script. I need to calculate the CRC32 of the file(s) which are successfully uploaded. How can I do this? PHP only have CRC32 function for strings. However, the...
12
by: Ola Natvig | last post by:
Hi all Does anyone know of a fast way to calculate checksums for a large file. I need a way to generate ETag keys for a webserver, the ETag of large files are not realy nececary, but it would be...
44
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are...
0
by: Missaka Wijekoon | last post by:
Folks, I have 3 mysql replicated servers ( 1 master + 2 slaves). One thing I noticed is that every once in a while the data (*.MYD) and index (*.MYI) files for a table may differ from the other...
27
by: Eric | last post by:
Assume that disk space is not an issue (the files will be small < 5k in general for the purpose of storing preferences) Assume that transportation to another OS may never occur. Are there...
7
by: RayAll | last post by:
I am using HTTP to upload files to a database ,I'm just curious if I can do it through FTP too and what would be the advantages and disadvantages of these two method? Thanks
6
by: Steven | last post by:
I have a problem with moving the backup of my database from machine to machine. The size is 17 Gig and my network keeps timing out when I try to ftp it from machine to machine. I have had the...
8
by: dagecko | last post by:
Hi I would like to know how to detect if a file is binary or not. It's important for me but I don't know where to start. Ty
11
by: MarkusR | last post by:
Good day, I need to safely copy files from one directory to another. I need to make sure that I do not lock the file making it unreadable by others. I am not sure if this is the default...
1
by: gdubois | last post by:
Hi all! Is there an easy way to scan files on network, and find out which files are new or modified? (VS2003, C#) I am trying to create a program to help myself manage the network. I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.