Forum
Perch_Verify_Uploads Case Sensitive?
Hello, according to the documentation, when using perch_verify_uploads
for an image field:
Image field types (type="image") default to only accepting the mime types from the webimage group specified in the filetypes.ini file. These are images that you’d normally embed on web pages (jpg, png, gif, svg, webp).
I have a client that is having an issue submitting an image with a JPG
extension, not jpg
. I was just wondering if when using perch_verify_uploads
are the mime types case sensitive?
Here's what I have setup in my config file for file security for this client:
define('PERCH_PARANOID', true);
define('PERCH_VERIFY_UPLOADS', true);
And this section in my filetypes.ini file:
[webimage]
image/gif
image/jpeg
image/jpg
image/png
image/svg+xml
image/webp
And the image field in my template:
<img src="<perch:content id="slide" type="image" label="Slide Image" bucket="home-slides" width="1170" height="480" crop="true" />" alt="Slide Image" />
I didn't use the accept
attribute for my image field because the documentation said jpg
is already included in the defaults.
What happens if you test the same file with upper and lower case extensions? That should give you the answer for your environment.
Thanks Drew.
Didn't know it was something environment-specific. Had the client change the extensions to lowercase and they can upload fine now.
Thank you!