Search code examples
wikixwiki

Insert link to local file onto xwiki


Hi this may apply to platforms/wikis outside of xwiki, but I am trying the embed a file by doing the following

[[myfile>>file://C:/users/myfile.txt]]

where clicking on the newly created link does nothing.

I have tried with backslashed file path too but no difference and three slashes infront of "file:"

this should be pretty straightforward....


Solution

  • There should be three slashes in a URI like file:///C:/.

    After the "protocol" part, the file URI scheme takes first a host name (which can be omitted in your case, because you are trying to access a local resource), then the path. Between host and path there is a slash. (This holds for other URI schemes, as well...)

    The slash has to remain, even if the host part is omitted.