Closed matdrapeau closed 7 years ago
@matdrapeau thank you for reporting it. We know about this issue and we fixed in the v1.3.
solved by adding
img.setAttribute('crossOrigin', 'anonymous');
beforeimg.src = src;
in code.
Hello, We did paid for the license and install the 1.3 version. Unfortunately, there is still a perpetual loading icon appearing and this message in the debugger:
Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. at Object.isBlankCanvas (http://localhost:5000/static/js/jquery.fileuploader.min.js:9:40036) at h (http://localhost:5000/static/js/jquery.fileuploader.min.js:9:10403) at h (http://localhost:5000/static/js/jquery.fileuploader.min.js:9:10526) at Array.<anonymous> (http://localhost:5000/static/js/jquery.fileuploader.min.js:9:10908) at u (http://localhost:5000/static/js/jquery.fileuploader.min.js:9:32225) at Image.o.onload (http://localhost:5000/static/js/jquery.fileuploader.min.js:9:33416)
@matdrapeau as you ca see in the changelog, we added item.data.readerCrossOrigin = 'anonymous'
option. That means that your file object should have the following structure:
{ name: 'filename1.txt', size: 1024, type: 'text/plain', file: 'uploads/filename1.txt', data: { readerCrossOrigin = 'anonymous' } }
@innostudio thanks, that is fixing the loading icon except that the png image is not previewed, it shows a "png" text icon instead.
I have an issue when using the data-fileuploader-files option with a remote image. I get such error:
Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
I enabled cross origin on the image server but still having this issue. Do you have an idea how to solve this?
thanks