We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当我打包到生产环境运行时 浏览器提示我原因XMLHttpRequest在同步请求下 responseType不允许被设置,报错 解决办法 dist/croppper.js 注释掉 // xhr.responseType = 'arraybuffer'; xhr.withCredentials = element.crossOrigin === 'use-credentials'; xhr.send(); 然后再这个方法里加上 stringToArrayBuffer方法 xhr.onload = function () { _this.read(stringToArrayBuffer(xhr.response)); };
function stringToArrayBuffer(str) { var buf = new ArrayBuffer(str.length); var bufView = new Uint8Array(buf);
for (var i=0, strLen=str.length; i<strLen; i++) { bufView[i] = str.charCodeAt(i); } return buf;
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
当我打包到生产环境运行时 浏览器提示我原因XMLHttpRequest在同步请求下 responseType不允许被设置,报错
解决办法 dist/croppper.js
注释掉 // xhr.responseType = 'arraybuffer';
xhr.withCredentials = element.crossOrigin === 'use-credentials';
xhr.send();
然后再这个方法里加上 stringToArrayBuffer方法
xhr.onload = function () {
_this.read(stringToArrayBuffer(xhr.response));
};
function stringToArrayBuffer(str) {
var buf = new ArrayBuffer(str.length);
var bufView = new Uint8Array(buf);
}
The text was updated successfully, but these errors were encountered: