SecurityError: The operation is insecure.
来源:互联网 发布:户型优化设计合同 编辑:程序博客网 时间:2024/05/30 02:26
ImageCropper.prototype.getCroppedImageData = function(width, height, mime)
{
var output = document.createElement("canvas");
output.width = width || this.cropWidth;
output.height = height || this.cropHeight;
output.getContext("2d").drawImage(this.imageCanvas, this.cropLeft, this.cropTop, this.cropViewWidth, this.cropViewHeight, 0, 0, output.width, output.height);
var r = output.toDataURL(mime || "image/jpeg");
{
var output = document.createElement("canvas");
output.width = width || this.cropWidth;
output.height = height || this.cropHeight;
output.getContext("2d").drawImage(this.imageCanvas, this.cropLeft, this.cropTop, this.cropViewWidth, this.cropViewHeight, 0, 0, output.width, output.height);
var r = output.toDataURL(mime || "image/jpeg");
return r;
注意toDataURL在转换图片时候有同域要求,若非同域图片,就会出现SecurityError: The operation is insecure.
错误。
SecurityError: The operation is insecure.
解决方法:在跨域的服务器上header设置为允许跨域请求
access-control-allow-origin: * access-control-allow-credentials: true
例如:在jsp页面加上response.setHeader("Access-Control-Allow-Origin", "*");时, 0 0
- SecurityError: The operation is insecure.
- SecurityError: The operation is insecure.
- jq中遇到的问题项目中出错遇到jquery无法赋值的情况 SecurityError: The operation is insecure.
- the chosen operation is not currently available
- The chosen operation is not currently available
- the user operation is waiting 解决办法
- Error: MySQL server is requesting the old and insecure pre-4.1 auth mechanism.
- add/remove operation is impossible, because the code element
- eclipse eclipse the chosen operation is not enabale
- add/remove operation is impossible, because the code element
- 彻底解决 MyEclipse出现the user operation is waiting的问题
- add/remove operation is impossible, because the code element
- RCP程序“The chosen operation is not enable”对话框
- The user operation is waiting for "Building workspace" to complete
- 彻底解决 MyEclipse出现the user operation is waiting的问题
- The user operation is waiting for "Building workspace" to complete
- 出现Invalid operation. The connection is closed.这种错误
- The user operation is waiting for "Building workspace" to complete
- 黑马程序员_关于JAVA中栈和堆,以及由此引发的一些思考
- Java中的CopyOnWrite容器
- 19 个 Android 开发工具
- 单片机中的NOP指令
- 股市专用名词
- SecurityError: The operation is insecure.
- 手机变身服务器后对教学过程的新思路
- Machine Learning(Andrew)Week6(上)
- 【Linux之路】进程与线程(二)
- A potentially dangerous Request.Form value was detected from the client
- 数据仓库和传统数据库的区别
- jquery ajax方式上传图片页面无刷新浏览
- socket
- pb中的打印----转