我已经编写了一个backbone视图,它将文件对象或blob作为实例化中的一个选项,然后检查该文件中的EXIF数据,根据传入的选项在必要时校正方向和调整图像大小。在我的示例代码中,我删除了所有其他函数,以避免添加不必要的混乱。如果你想看到整个视图,请访问它的。the source file and calls the transform function
var fr = new FileReader
我正在使用以下FileReader脚本尝试将附件上传到Salesforce中的一个对象。var f = document.getElementById('file-input').file;
// Keep a reference to the File in the FileReader so it can be accessed in callbacks});