Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

ImageUpload: Doesn't work on iPhone UNLESS it's a PNG

gharaldgharald
edited October 2015 in Vanilla 2.0 - 2.8

Recently upgraded to 2.1.11. Some users are complaining that they can't upload photos from their iPhones anymore. Though process of elimination, I discovered that when I try to post a photo using an iPhone (iOS 9.0.1):

-I CANNOT upload JPGs (native iPhone photo format), But...
-I CAN upload PNGs (native iPhone screenshot format)

I'm about to scour the ImageUpload code for clues - any ideas?

Comments

  • peregrineperegrine MVP
    edited October 2015

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    edited October 2015

    I can confirm this issue.

    My i-Users had been having problems, and I've just asked some of them to test upload a PNG and a JPG.

    PNG went fine, but no luck with the JPG.

    AfaIk there were no problems with iOS 8, so I think it is an iOS9 issue.

  • @whu606 Check this out:

    Photo upload no longer works with IOS 9
    https://discussions.apple.com/thread/7229860

    Joe McG Sep 21, 2015 7:39 AM
    I Have a site I use regularly where I need to upload photos. This morning I tried to upload for the first time after converting to IOS 9 on my iPad Mini. The site would not accept the photo telling me it was not in jpg or gif format. After several frustrating tries I copied the image to the Camera Roll on my iPhone 5s that is still running IOS 8. The upload worked perfectly.

    Reply: In iOS 9.0 Apple has changed the file extension from .jpg to .jpeg on uploads that come from your photo library, or iCloud drive, but not the camera. See if you can upload a photo directly from the camera. If that is the case, then the website needs to add the .jpeg extension for allowed file types.

    So maybe just adding an "e" to the code will help??

  • OK, I think I fixed it. Open imageupload.js and on line 12, change:
    {title : "Image files", extensions : "jpg,gif,png"}

    to
    {title : "Image files", extensions : "jpeg,jpg,gif,png"}

    @whu606 try this out and let me know if it works for you.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    edited October 2015

    @gharald

    Funnily enough, I was just coming on to post the same thing.

    I tried that, but it didn't seem to work, but maybe I have to clear my CloudFlare cache first.

    On an Apple forum, someone reported that they couldn't upload jpg files from an iOS9 phone to an Air-pad until they had reformatted their SD card.

  • @whu606 What is your max image size? I had to up mine from 2mb to 4mb. Many iPhone photos are now >2mb.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    I've got mine at 5mb, and I got some users to download small jpg files and try to upload, with no joy.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    Just seen on my site that adding jpeg did work, after I purged the CloudFlare cache.

  • how did purge the cloudflare cache? does it come from your host?

  • hgtonighthgtonight ∞ · New Moderator

    @kwekugt said:
    how did purge the cloudflare cache? does it come from your host?

    https://www.google.com/search?q=how+to+purge+cloudflare+cache

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • is the cloudflare in my host account or i need to create one ?

  • noncenonce Necro-on Forensics

    ask your host.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @kwekugt

    Did you register your site with Cloudflare?

  • i am hosting with bluehost and that's all i know for now. thanks

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    Bluehost offer Cloudflare, but you have to sign up for it.

Sign In or Register to comment.