Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Captive Portal fails to display images

    Captive Portal
    2
    3
    1032
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sgt_Josh last edited by

      Hi Guys,

      I'm just having some issues displaying svg files from my css file. The page is able to display without issues from my local workstation but not from the captive portal. Should I be able to display these files?

      Cheers
      Josh

      1 Reply Last reply Reply Quote 0
      • Gertjan
        Gertjan last edited by

        @Sgt_Josh:

        Should I be able to display these files?

        SVG files on the portal page is a no-go.

        But ….. Google knows about it  ;)
        After visiting this : http://redmine.lighttpd.net/issues/991
        So, add

        ".svg" => "image/svg+xml",
        

        here : https://github.com/pfsense/pfsense/blob/master/etc/inc/system.inc#L1326

        Stop the Captive portal service - restart it - and svg extensions will be recognized now.

        Create a file named image.svg like this

        
          <title>Exemple simple de figure SVG</title>
          <desc>An image with a line, a circle and a square.</desc> 
        
          <rect width="100" height="80" x="0" y="70" fill="green"><line x1="5" y1="5" x2="250" y2="95" stroke="red"><circle cx="90" cy="80" r="50" fill="blue"><text x="180" y="60">A text</text></circle></line></rect> 
        

        and upload this image.svg file with the Captive Portal File Manager. Note that it got renamed like this captiveportal-image.svg when uploaded.

        Use this in your html portal code:

        <object type="image/svg+xml" data="captiveportal-image.svg" width="200" height="100">Your navigator can't interpret SVG files</object>
        

        Firefow showed me the svg 'image' on my captive portal page.

        1 Reply Last reply Reply Quote 0
        • S
          Sgt_Josh last edited by

          You are indeed a hero member added the mine type and worked straight away  :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Products

          • Platform Overview
          • TNSR
          • pfSense Plus
          • Appliances

          Services

          • Training
          • Professional Services

          Support

          • Subscription Plans
          • Contact Support
          • Product Lifecycle
          • Documentation

          News

          • Media Coverage
          • Press
          • Events

          Resources

          • Blog
          • FAQ
          • Find a Partner
          • Resource Library
          • Security Information

          Company

          • About Us
          • Careers
          • Partners
          • Contact Us
          • Legal
          Our Mission

          We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

          Subscribe to our Newsletter

          Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

          © 2021 Rubicon Communications, LLC | Privacy Policy