Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Properly viewing SVG files after attached, (Using FileUpload)

AnorocAnoroc New
edited May 2012 in Vanilla 2.0 - 2.8

Hi Everyone,

I've just setup and started working with my new forum and I'm having an issue properly displaying SVG files that have been attached to a discussion. I'm currently using FileUpload, which allows me to attach an SVG, but it only shows as code. What I need it to do is allow users to click and download the file.

Does anyone have any insight regarding this?


Best Answer

  • 422422 Developer MVP
    Answer ✓

    in fileupload plugin , class.fileupload.plugin.php

    line 389

    if (in_array(strtolower(pathinfo($Filename, PATHINFO_EXTENSION)), array('bmp', 'gif', 'jpg', 'jpeg', 'png')))
             $ServeMode = 'inline';

    perhaps add , 'svg'

    and the same in class.mediamodel.php line 47

    if (!in_array(strtolower(pathinfo($Path, PATHINFO_EXTENSION)), array('bmp', 'gif', 'jpg', 'jpeg', 'png')))

    perhaps add , 'svg'


Sign In or Register to comment.