upload SVG images error message

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

upload SVG images error message


Image

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


v1.3
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Has it worked before? Uploading SVG files can be a security risk. Therefore it's possible that it is not enabled by default.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
diego
Site Admin
Posts: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

SVG format is not supported.. I will check the alert with the Arabian language.
bdavis
Jr. Bludit
Posts: 7
Joined: Sat Mar 31, 2018 7:08 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: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

the svg format is supported now, have you tried?
bdavis
Jr. Bludit
Posts: 7
Joined: Sat Mar 31, 2018 7:08 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: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

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: 7
Joined: Sat Mar 31, 2018 7:08 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: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

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: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

I created a issues to follow the error.

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