Verify HTTP file transfer

Here is the problem I am trying to solve.  I have a computer (actually it is a piece of medical equipment running windows 7 and does have access to internet explorer.)  This computer is creating a large data file that is many megabytes in size (sometimes over a few hundred MB.)

Because it is considered medical equipment, I can't load software onto the computer.  What I need to do is write a web application that does a file upload. That part is pretty easy.  Create the form, upload the file and handle the transfer and saving of the file on the server.

The part that I can't figure out is how can I (from within the html page /web browser) do a checksum on the file as it is on the computer hard drive so that I can compare it to a checksum on the same file once it is uploaded and stored on the server?  Because it is patient-related data that is subject to data retention policies, accessibility for legal and future medical needs, etc.  I need to be 100% certain the file was not corrupted during the transfer.  Given the quality of the data connections in various hospitals, there could be problems.

Any ideas would be appreciated...
LVL 14
Scott MadeiraAsked:
Who is Participating?
If you want to compute the checksum of the file on the medical device, you will need software on the device that can read the file. Since you cannot "install" software on the device, you will need an alternate mechanism to get executable code on the device. For example, if the device trusts the digital signature of a signed Java applet, that applet could compute the checksum.

If that's not possible then you will have to rely on the transport layer of the network connection to ensure a good transfer. (There is a checksum computed and verified on every network packet.) Where you might run into problems is if the connection is interrupted and you get a partial transfer. You can mitigate against partial transfers by having a two-step process: step 1. upload the file; step 2. confirm the upload. If the connection is interrupted during step 1 then step 2 cannot occur.
Have you ever used wget?  Can be used to download files / entire websites using port 80.

It may or may not work in your situation but check it out.  You can check the md5 checksum of the file download with it.
dmwynne, the medical device is an HTTP client; wget downloads files from an HTTP server.
Scott MadeiraAuthor Commented:
Thanks for the pointer.  I will look into using the Java applet to compute the local checksum prior to the upload.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.