Skip to content

Commit

Permalink
apacheGH-420 (browser) DATA_URL is improperly prefixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hazems committed Mar 3, 2019
1 parent 6185a0f commit f2e2dad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/browser/CameraProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function takePicture (success, error, opts) {
input.parentNode.removeChild(input);

var imageData = readerEvent.target.result;

return success(imageData.substr(imageData.indexOf(',') + 1));
return success(imageData); //success(imageData.substr(imageData.indexOf(',') + 1));
};

reader.readAsDataURL(inputEvent.target.files[0]);
Expand Down Expand Up @@ -79,7 +79,6 @@ function capture (success, errorCallback, opts) {

// convert image stored in canvas to base64 encoded image
var imageData = canvas.toDataURL('image/png');
imageData = imageData.replace('data:image/png;base64,', '');

// stop video stream, remove video and button.
// Note that MediaStream.stop() is deprecated as of Chrome 47.
Expand Down

0 comments on commit f2e2dad

Please sign in to comment.