-
Notifications
You must be signed in to change notification settings - Fork 64
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
Image regex is case sensitive #9
Comments
Thank you for bringing the case insensitivity to the light. I've updated it to be case insensitive now. Checking the file extension was more to make sure we are uploading something useful to Cloudinary, this should be replaced with a mime type check to make it less fickle and to remove the dependency of an extension. @manukall maybe you have some input as well about this ? |
to be honest i'm directly using the functions in |
I'm also of the opinion that the check should be an optional helper. Feels like Phoenix uploads are a common case. The submitted Alternatively |
I've updated the hex and removed both the file and url extension checks. |
Thanks @smeevil! |
If I'm not mistaken https://github.com/smeevil/cloudex/blob/master/lib/cloudex.ex#L6 will not match JPG, GIF, etc.
I'm also curious what the reasoning is for checking that the file has an extension. I'm going to have workaround this in when using Phoenix upload mechanism where the temp file doesn't have an extension.
The text was updated successfully, but these errors were encountered: