upload SVG images error message

User avatar
english4ar.com
Sr. Bludit
Posts: 49
Joined: Fri Apr 15, 2016 1:46 pm
Contact:

Tue Jun 07, 2016 4:14 pm

upload SVG images error message


Image

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


v1.3
User avatar
Edi
Site Admin
Posts: 1300
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Wed Jun 08, 2016 12:05 am

Has it worked before? Uploading SVG files can be a security risk. Therefore it's possible that it is not enabled by default.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
diego
Site Admin
Posts: 716
Joined: Sat May 16, 2015 2:53 pm
Contact:

Wed Jun 08, 2016 12:57 am

SVG format is not supported.. I will check the alert with the Arabian language.
bdavis
Jr. Bludit
Posts: 5
Joined: Sat Mar 31, 2018 7:08 pm

Thu Apr 12, 2018 8:37 pm

How would I go about enabling SVG uploads? Only I will be uploading anything so I trust myself! :D
User avatar
diego
Site Admin
Posts: 716
Joined: Sat May 16, 2015 2:53 pm
Contact:

Thu Apr 12, 2018 8:41 pm

the svg format is supported now, have you tried?
bdavis
Jr. Bludit
Posts: 5
Joined: Sat Mar 31, 2018 7:08 pm

Fri Apr 13, 2018 7:14 pm

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)
User avatar
diego
Site Admin
Posts: 716
Joined: Sat May 16, 2015 2:53 pm
Contact:

Sat Apr 14, 2018 4:21 pm

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
bdavis
Jr. Bludit
Posts: 5
Joined: Sat Mar 31, 2018 7:08 pm

Mon Apr 16, 2018 8:49 pm

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?
User avatar
diego
Site Admin
Posts: 716
Joined: Sat May 16, 2015 2:53 pm
Contact:

Tue Apr 17, 2018 9:23 am

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.
User avatar
diego
Site Admin
Posts: 716
Joined: Sat May 16, 2015 2:53 pm
Contact:

Tue Apr 17, 2018 9:24 am

I created a issues to follow the error.

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