In a single page we have multiple links to files of different file types. A single link looks like this:
<a href="/uploads/sandglass.pdf" download="sandglass.pdf"> download sandglass </a>
On click users simply get the file downloaded and can then open it in their devices.
The result that we want to achieve is to open the file inside the browser in a new tab.
Question is: how to achieve a similar result to how attachments are opened in gmail for example?
File types that need to be opened in a new tab are usually these: pdf, doc, docx, xls, xlsx, ppt, pps, jpg, png
.
Any help or guidance is much appreciated.