Support

Account

Home Forums Bug Reports "Allowed file types" are case sensitive, shouldn't be

Solved

"Allowed file types" are case sensitive, shouldn't be

  • Using the “Allowed file types” setting for an “Image” field in ACF Pro Version 5.2.7:

    http://i.imgur.com/qjDcQm5.jpg

    Users on our site reported an error trying to upload photos from an iPhone, which saves photos with a .JPG (uppercase) extension:

    http://i.imgur.com/bzQUPHQ.jpg

    Obviously I can just add the uppercase version as a short term fix, but I think file extensions should not be case sensitive.

    (It’s unclear if this is a problem with ACF or with WordPress, since the error occurs in the image upload frame)

  • Thanks for the bug report, I will pass this on to the developer.

  • Hi @radgh

    Thanks for the info.
    Is it safe to consider that JPG is the same as jpg?

    I’m happy to add this into the core, but don’t want to upset any existing case sensitive extensions.

  • Thanks for the reply @elliot.

    I would say it is safe to make them not case sensitive. The main reasoning is that file extensions in Windows are not case sensitive. That might be different on unix/mac.

    I think the more important question to ask is, is there any reason why someone would upload one file, and another one with the same extension except the opposite case, and intend the file types to be different. I’ve never encountered such a scenario.

    I think the main reasoning behind it is much simpler:

    1. iPhone cameras save photos using .JPG
    2. My Android’s camera saves photos using .jpg

    Both are still camera photos, and so I think they should NOT be case sensitive.

    Would it cause problems for people currently using the feature?

    Maaaaaaybe, but I think it is far more likely that this would fix more problems than it causes.

  • Hi @radgh

    Good justification, I’m sold. I’ll add it in

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘"Allowed file types" are case sensitive, shouldn't be’ is closed to new replies.