You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting 401 while loading images. Its ok, i need to send credentials in the request.
But the only thing i can do at the moment, is to edit the tui-image-editor.js directly and changing from
'Anonymous' to 'use-credentials'.
here:
var imageOption = {
padding: 0,
crossOrigin: 'use-credentials'
};
and here:
key: 'loadImage',
value: function loadImage(url, callback, options) {
var img = new Image();
if (options && options.corsenabled) {
img.crossOrigin = 'use-credentials';
}
img.src = url;
img.onload = function () {
var canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
var context = canvas.getContext('2d');
context.drawImage(img, 0, 0);
callback(canvas);
};
}
Expected Behavior
It should be possible to pass the crossorigin value over the intialization config object for the editor.
Otherwise i need to hardcode the value directly in the js file which is a really bad practise.
The text was updated successfully, but these errors were encountered:
Version
@Version 3.2.2
Development Environment
Angular 5+
Current Behavior
I am getting 401 while loading images. Its ok, i need to send credentials in the request.
But the only thing i can do at the moment, is to edit the tui-image-editor.js directly and changing from
'Anonymous' to 'use-credentials'.
here:
and here:
Expected Behavior
It should be possible to pass the crossorigin value over the intialization config object for the editor.
Otherwise i need to hardcode the value directly in the js file which is a really bad practise.
The text was updated successfully, but these errors were encountered: