Download ASP.Net file with CRC check

Is there a file upload control for ASP.Net that calculates the client-side checksum (CRC, MD5, etc.) in the contents of the file and passes the checksum to enable server-side checksum verification?

I looked at the answers to several questions about downloading files, but did not find this feature anywhere.

+4
source share
2 answers

From javascript, you will not be able to determine the file size on the client computer. Javascript runs inside the sandbox and cannot access local system files, which would be a security violation.

You can use silverlight and can get the file size and calculate the amount. You can check it out

Silverlight File Upaod

+1
source

You will need a client code to open the file, calculate this checksum and send it to your web server with the contents of your file; you cannot do this with simple javascript, since you should not have access to your user filesystem.

But just like @ Dan Herbert , commented out your question to use this client application, such as Flash, Java applet or Silverlight. I just wanted to make a more complete answer and explain why you cannot do this.

0
source

Source: https://habr.com/ru/post/1298994/


All Articles