1

I'm trying to insert image from local folder using execCommand in IE11:

JS:

document.execCommand('insertImage', false, "C://issue.jpg");

It is working on one computer, but it is not working on other computer. For non working case I get the following: issue

It seems that it is some Windows or browser configuration issue. But I cannot find setting for this. Will you please help me. Thank you.

sedoygosha
  • 11
  • 2
  • Where exactly is the page hosted? On an external web server, on a local server or on the filesystem (using file protocol)? – Teemu Feb 08 '18 at 09:23
  • It is on external web server. Example: https://jsfiddle.net/sedoygosha/c6b5k4ps/ (Need to create issue.jpg in C:/ folder). If I create local page with the same code, it will be work fine in non working computer. – sedoygosha Feb 08 '18 at 09:52
  • There are some options in Internet Options|Security|Internet Zone, click Edit and find Miscellanous section, where you can find some cross-domain options. I'm not going to try to translate my finnish option texts to english, but that's the section where you most likely will find the options to change. – Teemu Feb 08 '18 at 09:55
  • When I run your fiddle in IE11, I get two errors to the console. Something like "file://C:/issue.jpg has made HTTPS insecure" and "XMLHTTPRequest: Network error 0x80070005 Access denied". These errors refer to a CORS problem, but I'm not sure which options should be changed. – Teemu Feb 08 '18 at 10:19
  • @Teemu, thanks for your suggestion. But it did not help. I enabled "Miscellaneous > Access data sources across domains" for non working computer. As I saied above it didn't help. I have the same options in Miscellaneous for working and non working computers. No effect. Note: I also see "HTTPS insecure" and "XMLHTTPRequest: Network error 0x80070005 Access denied" errors for working computer. So these errors are not related to the issue. – sedoygosha Feb 08 '18 at 10:48

0 Answers0