I am trying to open the file available in local drive directly using the angular application with whatever the editor the system is associated with.
Html
<a href="file:///C:/Users/Public/Pictures/Sample%20Pictures/Desert.jpg">
<span (click)="openFile(parameter)">Open file</span></a>
I have also tried using the below approach with no help.
window.open("file:///C:/Users/Public/Pictures/Sample%20Pictures/Desert.jpg")
But I am getting the following error message in browser console:
- Not allowed to access local resource
I understand that we cannot directly access the local drive files directly using the angular application.
Is there any way round to open any type of file(like jpg, docx, txt, etc)?
I know its a common issue and definitely, your answers will help lot of people.
Thanks in advance.