开发者

MD5 checksum file uploads on the client side

开发者 https://www.devze.com 2023-03-20 16:14 出处:网络
I\'m writing a web application that will store files on the Amazon S3 cloud. The application needs to be able to show that files that are uploaded to it have not been altered at any time.Files will be

I'm writing a web application that will store files on the Amazon S3 cloud. The application needs to be able to show that files that are uploaded to it have not been altered at any time. Files will be uploaded to the web application server where they will be cached, and then uploaded to the Amazon S3 Cloud.

At each point in the process (file selected for upload on the client side, file stored on the caching server, file stored in the cloud) I want to take and compare md5 checksums to show the file has not been changed in any way. The application is part of a larger project in the legal sector, hence the need for the file reliability and validation.

Comparing the checksum of the file stored on the caching server, and the file stored in Amazon S3 is easy, but I am looking for a file uploader that will calculate a checksum on the client side and report this with the file upload. File sizes will likely be no more than 20MB in size so checksumming will not be too hard on the client machine.

Any ideas anyone? For compatibility purposes, I would prefer a flash or java implementat开发者_开发问答ion, although I understand that html5 will allow client side file access and this is already adopted in the latest firefox.

Any ideas extremely appreciated!!

Thanks

Ross


MD5 file hashes are only useful for determining unintentional file alterations. That is to say, if you're worried someone might intentionally alter the files an MD5 hash can't assure that because the algorithm has been cracked. You should look into using one of the SHA hashing capabilities.

Additionally I can't determine if you're asking for an app that can upload to your server or an app that will upload to Amazon. Clearly these clients would be very different as the S3 system already has an API for uploading files whereas your server does not.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号