2

I'm trying to allow SVG uploads via the file fieldtype (EE 2.9.2), but it gives me an error:

The file type you are attempting to upload is not allowed.

I have updated mimes.php with the following additions:

'svgz' => 'image/svg+xml',
'svg' => 'image/svg+xml'

but this has made no difference. I have also tried disabling XSS filtering in the EE CP - also does not work.

Finally, I added the following to config.php:

$config['allowed_types'] = 'svg';

And this does not work either. How can I get this working?

2 Answers 2

1

The svg files is considered as text/html mime type by the finfo_file().

So you need to set Allowed File Types as All file types inside File Upload Preferences to allow svg file uploads.

0

Have you tried creating a .htaccess file with

AddType image/svg+xml svg
AddType image/svg+xml svgz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.