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

arn

Well-known member
http://forums.macrumors.com/threads/problem-uploading-pictures.1987768/

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.

arn
 
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?
 
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.
 
Just a Test with iOS10.

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

Attachments

  • IMG_3508.webp
    IMG_3508.webp
    77.4 KB · Views: 12
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.
 
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.
 
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.
 
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.
 
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.
 
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.

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

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.

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.
 
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.
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.
 
Ultimately this is probably an iOS bug, but I have just added a workaround that adjusts the extension rather than throwing this error.
 
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.
 
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.
 
Top Bottom