File attachment types

Is something wrong? Do you have any suggestions? Let us know.
Tryss
Lives in gote
Posts: 502
Joined: Tue May 24, 2011 1:07 pm
Rank: KGS 2k
GD Posts: 100
KGS: Tryss
Has thanked: 1 time
Been thanked: 153 times

Re:

Post by Tryss »

EdLee wrote:Hi Tryss,

It's iOS; files and filenames are not readily shown.
Please see the reproducible steps and error message in post 13.


That's why I ask this question : If you're trying to upload a jpg trying to make it pass as a png (or the opposite), the rejection makes sense.

I got the same error message if I rename a .jpg as a .png and try to upload it.
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post by EdLee »

Hi Tryss,

Hmm, thanks. I thought we were past the 1980's DOS era where a filetype was determined by its extension ( which is easier to rename ), and not by its binary "header" bytes ( which is more involved to mess with ). Sigh.
I'm not trying to pass anything as anything else, as the steps show;
but it could be a 'bug' in iOS Photos...

( Looks like nobody else here has experienced this or tried to reproduce the steps on iOS... Oh, well. )
BlindGroup
Lives in gote
Posts: 388
Joined: Mon Nov 14, 2016 5:27 pm
GD Posts: 0
IGS: 4k
Universal go server handle: BlindGroup
Has thanked: 295 times
Been thanked: 64 times

Re:

Post by BlindGroup »

EdLee wrote:Hi Tryss,

Hmm, thanks. I thought we were past the 1980's DOS era where a filetype was determined by its extension ( which is easier to rename ), and not by its binary "header" bytes ( which is more involved to mess with ). Sigh.
I'm not trying to pass anything as anything else, as the steps show;
but it could be a 'bug' in iOS Photos...

( Looks like nobody else here has experienced this or tried to reproduce the steps on iOS... Oh, well. )


Just followed the steps you gave to post this with my iPhone:
8EE69A38-41D9-4298-9EDB-2136F4428B54.jpeg
8EE69A38-41D9-4298-9EDB-2136F4428B54.jpeg (200.36 KiB) Viewed 214639 times


Seems to work. Although, the system seems to have saved the cropped file as a.jpeg. Phone is running iOS 12.
BlindGroup
Lives in gote
Posts: 388
Joined: Mon Nov 14, 2016 5:27 pm
GD Posts: 0
IGS: 4k
Universal go server handle: BlindGroup
Has thanked: 295 times
Been thanked: 64 times

Re:

Post by BlindGroup »

EdLee wrote:Hi Dave, Kirby,

1. iOS Photos app: Crop a screenshot, save it to iOS "Photo Library"
2. L19 > Post Reply > Filename > tap "Choose File" button
3. iOS > iphone "Photo Library" > pick cropped photo from (1)
4. tap "Add the file"
5. Error message: Image file type mismatch: expected extension jpg but extension png given
Screenshot:
IMG_0295.PNG


Your post made me wonder if there was a way to change the picture format in iOS. I found this for iOS 11: http://osxdaily.com/2017/09/29/change-i ... jpeg-heif/

Could this be the issue? Maybe L19 is reading the header and confusing the new iOS format for PNG. Unfortunately, these features were changed with iOS 12. So, I couldn't experiment on my phone.
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: File attachment types

Post by Kirby »

Just to be sure, how about try to email the screenshot to yourself, and see what the extension really is. If you're ambitious, maybe check to see what the header bytes say about the image type (e.g. http://pwet.fr/man/linux/formats/magic).

If it does turn out that L19 is incorrectly identifying the file's proper type, we could modify this, but this part of control is managed by php, and is not a configurable option through phpbb.
be immersed
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post by EdLee »

Hi Kirby,

If I take a raw screenshot, it's .jpg, and I can upload it here OK.

But if I use iOS Photos to crop it, it's still .jpg, but I get the error message when I try to upload it. At least, the error message seems to be worded incorrectly: it says "extension jpg expected but extension png given".
But the cropped photo does have an extension .jpg.
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re:

Post by Kirby »

EdLee wrote:Hi Kirby,

If I take a raw screenshot, it's .jpg, and I can upload it here OK.

But if I use iOS Photos to crop it, it's still .jpg, but I get the error message when I try to upload it. At least, the error message seems to be worded incorrectly: it says "extension jpg expected but extension png given".
But the cropped photo does have an extension .jpg.


The checks for file extensions are handled in php, so it's hard for me to do much about it, because I don't have access to modify that configuration. Can you send me the cropped file so I can investigate further?
be immersed
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post by EdLee »

Happy to, except it won't let me upload it here. :)
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: File attachment types

Post by Kirby »

You can email it to me.

My email address is my last name, followed by the first letter in my first name, at the domain for the University of Michigan (5-letter university identifier followed by three letter education extension).
be immersed
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: File attachment types

Post by Bill Spight »

Kirby wrote:My email address is my last name, followed by the first letter in my first name, at the domain for the University of Michigan (5-letter university identifier followed by three letter education extension).


OMG! :o Sounds like mathlish. :cool: ;)
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post by EdLee »

The 5-letter ID takes a bit of digging... :)
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: File attachment types

Post by Kirby »

EdLee wrote:The 5-letter ID takes a bit of digging... :)


umich
be immersed
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: File attachment types

Post by Kirby »

Thanks for sending the attachment, EdLee. I tried uploading here, and it seems to work?

FullSizeRender.jpg
FullSizeRender.jpg (19.2 KiB) Viewed 23668 times


I used the "Upload attachment" feature, and then used "Place inline". Are you using a different process?
be immersed
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post by EdLee »

Hi Kirby, same process but on an iphone5, Safari.
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: File attachment types

Post by Kirby »

Using iPhone SE this time.
FDDC6E96-8C4B-4CAE-B036-C4D7AD7DE226.jpeg
FDDC6E96-8C4B-4CAE-B036-C4D7AD7DE226.jpeg (20.15 KiB) Viewed 23649 times


I'll try harder to see if I can find a way to reproduce this behavior..
be immersed
Post Reply