You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Bleckmann (JIRA)" <ji...@apache.org> on 2015/06/06 02:17:01 UTC

[jira] [Created] (CB-9130) blobs not wokring properly

Bleckmann created CB-9130:
-----------------------------

             Summary: blobs not wokring properly
                 Key: CB-9130
                 URL: https://issues.apache.org/jira/browse/CB-9130
             Project: Apache Cordova
          Issue Type: Bug
            Reporter: Bleckmann


var xhr = new XMLHttpRequest();
xhr.open( "GET", "/genimg/320x320", true ); //use a self hosted png to overcome x-orign issues
xhr.responseType = "arraybuffer";
xhr.onload = function( e ) {
    var arrayBufferView = new Uint8Array( this.response );
    var blob = new Blob( [ arrayBufferView ], { type: "image/png" } );
    var urlCreator = window.URL || window.webkitURL;
    var imageUrl = urlCreator.createObjectURL( blob );
    var img = document.createElement("img");
    img.src = imageUrl;
		document.body.appendChild(img);
};
xhr.send();

returns on cordova 4:
GET blob:http%3A//192.168.0.123%3A4000/40f86894-0f51-4d20-add6-f0ef16171c29 404 (Not Found)

bug was discovered after updating an app, so it was working in the former version...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org