Page 1 of 2

upload SVG images error message

Posted: Tue Jun 07, 2016 4:14 pm
by english4ar.com
upload SVG images error message


Image

'.$->g.............


v1.3

Re: upload SVG images error message

Posted: Wed Jun 08, 2016 12:05 am
by Edi
Has it worked before? Uploading SVG files can be a security risk. Therefore it's possible that it is not enabled by default.

Re: upload SVG images error message

Posted: Wed Jun 08, 2016 12:57 am
by diego
SVG format is not supported.. I will check the alert with the Arabian language.

Re: upload SVG images error message

Posted: Thu Apr 12, 2018 8:37 pm
by bdavis
How would I go about enabling SVG uploads? Only I will be uploading anything so I trust myself! :D

Re: upload SVG images error message

Posted: Thu Apr 12, 2018 8:41 pm
by diego
the svg format is supported now, have you tried?

Re: upload SVG images error message

Posted: Fri Apr 13, 2018 7:14 pm
by bdavis
Yes I have tried it dieg. I get an alert box popup that informs me only jpg, jpeg, gif and png are supported. I can see the upload support for svg in uploader.php (under the folder ajax) but I still get this message every time I try to upload any svg:
Error. Supported image file types: *.(jpg|jpeg|gif|png)

Re: upload SVG images error message

Posted: Sat Apr 14, 2018 4:21 pm
by diego
Try to add the svg format in this files.
https://github.com/bludit/bludit/blob/m ... -v8.js#L33

and let me know if works. thanks

Re: upload SVG images error message

Posted: Mon Apr 16, 2018 8:49 pm
by bdavis
Hi diego, thanks for your help.

Just changing that line in the js file did not do it on its own. It enabled me to upload the svg but there was no thumbnail for the uploaded file and trying to insert the resultant image into a post just came up as undefined.

So I had a look in my error logs and noticed a symlink error

Code: Select all

PHP Warning:  symlink(): Cannot create symlink, error code(1314)
Line 76 of uploader.php creates a symlink of the the uploaded svg file in the thumbnail folder. Since this wasn't working I just changed the command to copy and bobs your uncle - upload complete and without error!

Out of interest - what is the gain in symlinking instead of just copying?

Re: upload SVG images error message

Posted: Tue Apr 17, 2018 9:23 am
by diego
the symlink is like a direct access to the original file, with the symlink you are not copying two times the same file.
I going to check, and try to fix it.

Re: upload SVG images error message

Posted: Tue Apr 17, 2018 9:24 am
by diego
I created a issues to follow the error.

https://github.com/bludit/bludit/issues/686