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)
Anoroc
New
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?
Thanks!
Tagged:
0
Best Answer
-
422 MVP
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'
There was an error rendering this rich post.
0
Answers
in config have you allowed svg file attachments ?
There was an error rendering this rich post.
I have, which works. It just doesn't handle them correctly. Here's a link:
http://knkusa.com/forums/discussion/1/felt-samples#Item_3
It just shows up as code, instead of allowing to download the file.
Thanks!
in fileupload plugin , class.fileupload.plugin.php
line 389
perhaps add , 'svg'
and the same in class.mediamodel.php line 47
perhaps add , 'svg'
There was an error rendering this rich post.
Thanks! I gave this a shot. I can now right click the icon to download (by right clicking) which I think is more than acceptable.
Thanks for the help!