html - Download local files using href -
i made web app using java (jersey servlets on backend) , angularjs on frontend. want open in new tabs or download local files. tried using:
<a href="file:///{{course.path}}" target="_blank" ><span> {{course.filename}} </span></a>
where course json like:
{type: "pdf", path: "c:/users/tom/desktop/courses/course2.pdf", areasubject: "it", created: 1434700150341, filename: "course2"}
when click on it, opens blank page (about:blank) , nothing appears.when type on browser file:///c:/users/tom/desktop/courses/course2.pdf
content appears. how can make works when click tag? use chrome.
Comments
Post a Comment