Martin Dreher
Martin Dreher

Reputation: 1564

Open a File without downloading

Using a confluence page in our intranet, I want to design a simple page that allows my colleagues a quick access to some working material, namely links to

  1. other html pages (no problem)
  2. existing excel-files and ms access frontends

I thought this would be as simple as the following:

<!DOCTYPE html>
<html>

<body> 
    <ul class = "navmenu">
        <li><a href="L:\HR\Info_Pool\Infopool_R9.accdb" target="iframe_m1">Example 1 MS Access</a></li>
        <li><a href="\\home-ch\home-ch$\B036081\Martin\01_Skripting\04_html\HR-Einstiegsseite\test_excel.xlsx">Example 2 Excel</a></li>
        <li><a href="\\home-ch\home-ch$\B036081\Martin\01_Skripting\04_html\HR-Einstiegsseite\Test.txt">Example 3 Txt</a></li>
        <li><a href="https://stackoverflow.com/questions/ask">Example 4 Link</a></li>           
    </ul>
</body>
<html>

However, whenever linking something that is neither a html nor textfile, the user gets prompted to download (thereby duplicate), when all i want to do is to provide a link to the file.

Is there any easy way to achieve this, while keeping scripts to a minimum (mainly because either windows defender or confluence seem to block the scripting part from my webpages), or do i have to refer to a locally saved HTA-File?

Upvotes: 1

Views: 3070

Answers (1)

Peter B
Peter B

Reputation: 24147

Browsers know and understand web pages (HTML + images, scripts and CSS) but pretty much everything else is an "unknown" to them, and will lead to a download prompt, with just 2 general ways to avoid this:

  1. Client-side plugins/extensions can handle some of these "unknown"s, e.g. to view PDF-files.
    Note: the file will typically first be downloaded to the 'temp' or 'downloads' folder, and then it is displayed in the browser.
  2. Server-side plugins may be used to interpret the "non-web" file and render it as a webpage.

If you don't have such plugins, or can't use them, then a download will be unavoidable.

Upvotes: 1

Related Questions