質問

How do I link to a local/intranet file within HTML?

I've seen this and many other questions but it's not working for me. Not using Chrome and not using IE 11. Not for PDFs, WAVs or MP3s. Not clicking, not right-clicking/open-in-new-tab/window, not dragging.

Here's the HTML rendering (it's Ruby on Rails on the server).

<table cellspacing="2" cellpading="0px" border="1">
  <thead>
    <tr>
      <th>Verbiage</th>
      <th>Tags</th>
      <th>Language</th>
      <th>Talent</th>
      <th>Audio</th>     
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
      <tr>
        <td>A book</td>
        <td></td>
        <td>English</td>
        <td>Joe</td>
        <td>
        <a href="file:///C:\Ruby193\doc\bookofruby.pdf">C:\Ruby193\doc\bookofruby.pdf</a>
        </td>
        <td><a href="/prompts/12">Show</a></td>
        <td><a href="/prompts/12/edit">Edit</a></td>
        <td><a data-confirm="Are you sure?" data-method="delete" href="/prompts/12" rel="nofollow">Destroy</a></td>
      </tr>
  </tbody>
</table>
役に立ちましたか?

解決

I found this post when I was looking to answer the same question. Thought I'd post the answer that worked for me in case it helps someone else.

Six slashes worked for me where three didn't. I also didn't need a backslash after my directory letter.

file://////Z:/filepath/filename.pdf
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top