Open rammohangowd opened 4 years ago
Hi!
You can't do it that way. I mean if I would open the web page it will not load since I do not have access to your machine.
The correct way to load a file through object is more like :
<object id="demo-tiger" type="image/svg+xml" data="'assets/test.svg'" style="width: 500px; height: 500px; border:1px solid black; ">Your browser does not support SVG</object>
While my test.svg is in the assets folder
I hope this helps you.
Hi, I am trying to load SVG file from remote shared folder path in Object element in my angular 8 application, below is the code snippet.
<object id="svg1" xmlns:xlink="http://www.w3.org/1999/xlink" type="image/svg+xml" xmlns="http://www.w3.org/2000/svg" data="file://machinename/svg/test.svg"></object>
But when run application I am getting an error like "Not allowed to load local resource: file://machinename/svg/test.svg" in console.
Note: I am able to access the path from browser address bar directly: "file://machinename/svg/test.svg"
Is there anyway that I can resolve this issue.