1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed iOS 10, Uploading Cropped Image, "The contents of the uploaded image do not match the file's extensi

Discussion in 'Resolved Bug Reports' started by arn, Aug 18, 2016.

  1. arn

    arn Active Member


    Got a report that Xenforo is complaining about some images uploaded under iOS 10. Specifically, it seems to happen when the image is cropped in the Photos app first. I had an editor of mine verify this was happening to him. We aren't on latest version of xF, but also happened here on this install.

    iOS 10 is in public beta now. Would be nice to get it tested before it comes out in September.

  2. Chris D

    Chris D XenForo Developer Staff Member

    I don't appear to have this issue in iOS 10 with Chrome or Safari.

    Which version of iOS 10 beta is in use? Which iOS device is in use?

    Do you have any add ons relating to file uploads? e.g. Are you able to upload more than one file at a time?
  3. arn

    arn Active Member

    We don't have any file upload add-ons. And my editor had it happen here too. I've asked him to answer the other questions.
  4. mcatze

    mcatze Well-Known Member

    Just a Test with iOS10.

    Edit: Create and uploaded with iPhone6 with iOS10 Public Beta 5 and Chrome. No Problems or Errors...

    Attached Files:

  5. Chris D

    Chris D XenForo Developer Staff Member

    Was that image cropped? Note the report states that the issue is with uploading cropped images.
  6. WildCowboy

    WildCowboy New Member

    I am the editor arn refers to. :) Further testing suggests it only affects screenshots taken on iOS that are then cropped in the Photos app on iOS 10. Photos work ok.

    Screenshots taken and cropped in iOS 10 have the issue. If I take a screenshot on iOS 9, let it sync over to an iOS 10 phone through iCloud, and then crop, I also have the error.

    I'm testing using iOS 10 beta 6 on an iPhone 6s Plus, though we've had reports from users on earlier betas and on both iPhones and iPads. I can replicate the issue both on our forums and here in XF forums.

    I suspected it might have something to do with nondestructive editing in Photos and how the original and cropped versions are packaged and then the uploader is trying to grab that and not recognizing as a compatible format, but I don't know why screenshots and photos would differ in their behavior.
  7. Chris D

    Chris D XenForo Developer Staff Member

    Ok thanks for that.

    Yes, it seems to be screenshot related.

    I need to do some more testing. If this works on iOS 9 (which I'm fairly sure it does) then it actually could be an iOS 10 bug, and one that feels vaguely familiar from the iOS 9 beta... ;)

    They seem to break the same things every time and then fix them.
  8. Chris D

    Chris D XenForo Developer Staff Member

    This is definitely iOS 10 doing something weird and unexpected.

    The screenshots all start life as a JPG file. Cropping them saves them with a .png extension, but the content within the file is still very much a JPG.

    This seems like a mistake, to me, so I will report it as a bug with Apple.
    arn likes this.
  9. WildCowboy

    WildCowboy New Member

    Okay, thanks. Post the radar number if you want and we can try to dupe it to raise visibility.
  10. Chris D

    Chris D XenForo Developer Staff Member

    I don't know what a radar number is, but I just reported it via bugreport.apple.com and got the following problem number: 27913021.
  11. Rambro

    Rambro Well-Known Member

    I'm on 9.3.2 and just smacked into this. I took a screenshot and it saved with a .png extension with no editing. The system rejected it as having the wrong extension. I renamed it to .jpeg and it worked.
  12. WildCowboy

    WildCowboy New Member

    Yep, that's the radar number. I'll file a bug report as well and reference yours. Thanks.

    I haven't been able to replicate the issue on iOS 9.3.4 in a variety of tests, but tough to cover all permutations. Odd that you experienced problems with no editing involved.
    Chris D likes this.
  13. Rambro

    Rambro Well-Known Member

    for the record, i misspoke and am on 9.3.4. also, it only happened that one time, so i'm not really sure what to make of it.
  14. Mike

    Mike XenForo Developer Staff Member

    Ultimately this is probably an iOS bug, but I have just added a workaround that adjusts the extension rather than throwing this error.
    HWS likes this.
  15. RobParker

    RobParker Well-Known Member

    Is that fixed for future versions or available now?
  16. Mike

    Mike XenForo Developer Staff Member

    It was included in 1.5.10.
    RobParker likes this.
  17. RobParker

    RobParker Well-Known Member

    Is it patchable into older versions? Still on 1.4 due to various reasons. Don't worry if not but thought it was worth asking.
  18. Chris D

    Chris D XenForo Developer Staff Member

    We wouldn't backport general fixes like this to older versions. I'm still holding out for Apple fixing it. My bug report was closed as a duplicate so it seems to be annoying other people too. Seems bizarre to me that they haven't fix it, yet. Since the most recent iOS 10 beta my phone has been reporting that I'm running iOS 10.0.1 and it's still not fixed there. I'll keep testing it and report back.
  19. RobParker

    RobParker Well-Known Member

    Cheers. I know sometimes it's a standalone file that can be replaced and is pretty version agnostic but if it was anything bigger than I wouldn't expect it to be back-ported :)

    I know we should really update but we've put it off for ages (due to needed to faff with updating styles, etc) and now I'm inclined to just wait for XF2.

Share This Page