Link to a UNC path


(Dominik Hug) #1

Hello

I use Discourse as a Intranet Forum.
Now I try to make a Hyperlink to a file on a servershare (\\server.domain.local\share\file.txt).

When I create a link to a UNC path, it appears, but it does not work. When I click on the link nothing happens.

Thats the code I try in Discourse:
[My File] (file://///server.domain.local/share/file.txt)

Is there a way to create a Hyperlink to a UNC Path? Or is it generally not supported?


(David Taylor) #2

Have you added “file” to the allowed href schemes site setting?


(Dominik Hug) #3

Hi David

That does the trick :grinning::thumbsup:

Thank you!


(Jelle Feringa) #4

It looks like the updated markdown renderer won’t convert file:// paths properly ( discourse 1.9.5 )


(Pierre Grand) #5

Hello,
I have added file to “allowed href schemes” but when I create a hyperlink using a file:// url, Discourse will post it with https instead of file.
Then when changing the https back to “file” it’s still opening a https link when clicking on it.

Is the “file” scheme supported in Discourse(I’m in v2.2.0.beta2 +5)?
br


(Jeff Atwood) #6

@jomaxro can you verify we didn’t regress on href scheme support?


(Joshua Rosenfeld) #8

Can confirm that we did not regress completely, adding ftp or steam works. I cannot get file to work, however, though that could just mean I’m doing something wrong. Never used the file href scheme before.


(Jeff Atwood) #9

Why are there an unusual number of forward slashes in there? Shouldn’t it be the same pattern for all schemes?


(Joshua Rosenfeld) #10

No clue. As mentioned, I’ve never seen the file href before. I used 3 for my screenshot as that’s what I saw over on SO: html - href="file://" doesn't work - Stack Overflow. In any case, I tried 1 (just in case), 2 (normal), 3 (SO answer), 4, & 5 (example in OP) slashes, none worked.


#11

Is there any update on this issue? I run in the same problem using latest version. File is not working as expected.