Skip to content
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

Validation #6

Closed
wants to merge 5 commits into from
Closed

Validation #6

wants to merge 5 commits into from

Conversation

koria
Copy link

@koria koria commented Nov 6, 2020

Problem with ImageContentValidator #5

            $imageProperties = @getimagesizefromstring($fileContent);
            if (empty($imageProperties)) {
                throw new InputException(new Phrase('The image content must be valid base64 encoded data.'));
            }
            $sourceMimeType = $imageProperties['mime'];

getimagesizefromstring () returns null for .svg images
just wrap this method with the isSvg () method and we can load .svg images via the API

Need more refactor, but now it works without problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants