I have img object upload by user for simple:
<img alt="" id="imgpics" src="data:image/png;base64,iVBORw0KGgoAAAANSUh.....
I want upload image through jQuery.ajax
<script type="text/javascript">
function callajax(){
var data = new FormData();
var blob = new Blob([imgpics.src], { type: "text/plain" });
data.append("inputfile.64data", blob);
$.ajax({
type:'post',
url:'ajaximage,
data: data,
cache:false,
mimeType: "multipart/form-data",
success:function(data){
alert("success");
//alert(data.message);
},
error: function(e){
alert(e.massage());
}
});
}
</script>
I do not know why every time I call there are jQuery error for me:
NS_ERROR_XPC_BAD_OP_ON_WN_PROTO: Illegal operation on WrappedNative prototype object [Break On This Error]
value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); Is there anything wrong about calling?
where is my error? how to change it?