create new tag
, view all tags

SID-02329: Link to Filesystem

Status: Answered Answered TWiki version: 6.0.0 Perl version: v5.10.0
Category: CategoryMissingFunctionality Server OS: Suse Linux Enterprise Server 11 SP1 Last update: 8 months ago

Am I able to put a link to a file in my filesystem and show the content in a topic?



This line - copied in a browser - opens the jpg

-- Peter Starek - 2017-09-05

Discussion and Answer

Short answer: TWiki does not autoconvert File URLs to image links, but You can try like this:

<img src="file:///Z:/H14_Projekte/Infra/ARTE/1_Arbeit/Obenauer/Screenshots/AmpelGRÜN.jpg" />

Long answer: File URLs have their problems, and a clarification of their not very convincing standardisation in the ancient RFC:1738 didn't come up until this year in RFC:8089. The quirks are:

  • Unlike HTTP URLs, File URLs have no defined "access protocol", so browsers only know how to open files on your local drives. However, other people visiting the same web page may not have the same image in the same place.
    • The TWiki way to do it would be to attach the image to a topic, and then refer to this attachment, so that everyone gets the same picture.
  • Unlike HTTP URLs, local files do not provide information about their MIME type, so browsers guess from the extension or from peeking into the file. For text files (not relevant for your question), local files may also lack information about their encoding.
  • In your path, there's a character which has a different representation in different encodings. You'll need some guesswork to get a consistent encoding between your file system and your web page / TWiki configuration, or stick to ASCII file names.

-- Harald Jörg - 2017-09-05

Thank you for the answer. Unfortunately the <img src...> does not work. But in the long answer it is explained, so the ticket can be closed.

-- Peter Starek - 2017-09-06

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Status Answered
Title Link to Filesystem
SupportCategory CategoryMissingFunctionality
TWiki version 6.0.0
Server OS Suse Linux Enterprise Server 11 SP1
Web server Apache httpd 2.2.10
Perl version v5.10.0
Browser & version Firefox 52.0.2
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2017-09-06 - PeterStarek
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.