#1 December 14, 2020 3:50pm

doon.mok
Member
Registered: May 6, 2015
Posts: 94

upload svg files not working

Hello,

I just upgraded to bigtree 4.4.11 locally and tried to upload an svg file through Files > Add Files. It it seems to hang once I select the svg file.
I tried adding different variations of the below code to .htaccess and httpd.conf(Mamp) but still same issue.
Tried without the periods before svg and svgz.
Tried without AddEnco... line

AddType image/svg+xml .svg .svgz
AddEncoding gzip svgz

Any suggestions to why its not working?

Offline

#2 December 15, 2020 4:09pm

doon.mok
Member
Registered: May 6, 2015
Posts: 94

Re: upload svg files not working

I think I found the issue and it is possibly a bug. I was getting the error below.

(index):145 Uncaught TypeError: Cannot read property 'indexOf' of undefined

It was referring to core/admin/modules/files/add/file.php, line 42 which checks if it is a svg.
Instead of

} else if (file.type.indexOf("image") !== -1 && this.type.indexOf("svg") === -1) {

it should be

} else if (file.type.indexOf("image") !== -1 && file.type.indexOf("svg") === -1) {

Once I changed it from "this" to "file", I was able to upload an svg file.

Offline

#3 December 16, 2020 4:02pm

doon.mok
Member
Registered: May 6, 2015
Posts: 94

Re: upload svg files not working

Saw on github you had already fixed the issue.

Offline

#4 December 16, 2020 6:46pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 925

Re: upload svg files not working

Sorry for the delay in responding here -- hopefully we'll get out a 4.4.12 release with that fix in soon!

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.