New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Certain SVG file is not allowed in image only upload directory #2808
Comments
I wasn't able to replicate this. If other SVG files work fine, I suggest that you open this file in code editor and check if it looks like valid XML |
It sure does look like valid XML: And I just replicated it, using a clean copy of EE 7.2.8. Here are the steps:
|
PHP Version 7.4.21, btw |
Okay, you are right, it's not exactly valid - there is a declaration missing: After I added it, EE accepted the file. I guess, it is the correct behavior. Correct, but do you think it's good? It could be confusing for an editor, to be able to download an image from one website, where it is rendering totally fine, but not to be able to upload it to another. |
The file still should be accepted, despite missing There must be something specific in how your server handles MIME types. Can you do some checks for me?
Upload the file and inspect browser console for network requests (because the upload is AJAX). |
I have three EE installs: localhost, Digital Ocean droplet, and a simple virtual hosting for a small website. And everywhere this file wasn't accepted, so this is not because of my setup, I guess :) With I made a video! |
The error is expected in this case; I'd like to see what is returns in Response tab for this request |
Interesting. This should just work. Do you by chance have Also, you don't have any manipulations (resize / crop) assigned to this upload directory, right? |
No, no mimes.php on both local copies of EE - test install and the dev environment of my website. I got manipulations on dev environment, but no manipulations on the test installation — it is fresh and clean, just installed for testing purposes. |
Ok. If you change line 224 ( |
Yes, now EE is accepting this file! |
Great! Thanks for helping me debug this |
Always a pleasure, Yuri! Glad to help you and EE :) |
Resolved #2808 where some servers did not accept SVG files to be uploaded into image-only directory
Resolved #2808 where some servers did not accept SVG files to be uploaded into image-only directory
EE 7.2.8
This SVG image can not be uploaded as an image in EE:
The text was updated successfully, but these errors were encountered: