guys, I"m doing a js slice to upload a file. The front end passes a unique logo of the file. After using md5, I found that different videos print the same encryption value? This is very embarrassing, Google has not solved for a long time!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://cdn.bootcss.com/blueimp-md5/1.1.0/js/md5.min.js"></script>
</head>
<body>
<form action="">
<input type="file" id="test" multiple="multiple"/>
</form>
<script>
window.onload=function(){
let upInput=document.getElementById("test");
upInput.addEventListener("change",function(){
var file = this.files[0];
var reader = new FileReader();
reader.readAsArrayBuffer(file);
reader.addEventListener("load", function(e) {
var res = e.target.result;
console.log(res,"res")
var md5Info=md5(res)
console.log(md5Info,"md5Info")
});
})
}
</script>
</body>
</html>
this is a temporary demo,. You can run it.