我的所有图像都以相同的顺序开始?



继续我的实验和我的最后一个问题(解决了顺便说一句,谢谢!! 我意识到我上传的所有图像都以相同的顺序开始:

/9j/4AAQSkZJRgABAQAAAQABAAD/

有谁知道那是什么? 我的第一印象是它应该是某种CRC,但它必须随着每个更新的文件而改变

我的代码是:

<button type="button" class="btn btn-primary" id="bid_uploadPicture">Subir Imagen</button>
<input type="file" id="file" accept='image/*' style="display:none;" />
jQuery(function ($) {
$("#bid_uploadPicture").click(function () {
event.preventDefault();
document.getElementById("file").click();
});
$("#file").change(function () {
var fr = new FileReader();
fr.onload = function (e) {
data = new Uint8Array(e.target.result)
console.log(e.target.result);
}
//fr.readAsArrayBuffer(this.files[0]);
fr.readAsDataURL(this.files[0]);
});
});

我只是给出答案,我在这里发布,以防其他人有同样的兴趣

事实证明,这个序列是JPG签名和上传图片的格式结构,如这篇维基百科文章所述:

https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format

问候!!!

最新更新