Life In 19x19
http://lifein19x19.com/

File attachment types
http://lifein19x19.com/viewtopic.php?f=14&t=222
Page 1 of 2

Author:  PeterHB [ Fri Apr 23, 2010 10:01 pm ]
Post subject:  File attachment types

I just tried to attach a .pdf file.

The board blocked it with "The extension pdf is not allowed."

Is this intentional? What file extensions are allowed?

Author:  Jordus [ Fri Apr 23, 2010 10:02 pm ]
Post subject:  Re: File attachment types

Go ahead and try it now...

Author:  Jordus [ Fri Apr 23, 2010 10:10 pm ]
Post subject:  Re: File attachment types

100% sure it works now.

Author:  PeterHB [ Fri Apr 23, 2010 10:22 pm ]
Post subject:  Re: File attachment types

Thanks. Works fine now.

Author:  xela [ Tue Sep 18, 2018 6:35 pm ]
Post subject:  Re: File attachment types

Same problem here, but with .csv and .txt extensions. Can you clarify whether it's by design or a bug?

Author:  Kirby [ Wed Sep 19, 2018 4:19 am ]
Post subject:  Re: File attachment types

xela wrote:
Same problem here, but with .csv and .txt extensions. Can you clarify whether it's by design or a bug?


Not a bug, per se. it's just that there is a whitelist if allowed extensions for uploading. We disallow filed with arbitrary extension types to be uploaded. I don't see harm in csv or txt, so I've whitelisted them.

Author:  EdLee [ Wed Sep 19, 2018 6:07 am ]
Post subject: 

Is .png disallowed for images ?

Ugh, yes. On iOS, a default screenshot is saved as a .jpg.
But iOS's Photos app's Crop function saves it as .png, which is disallowed for image upload here... :-?

Is there a problem with allowing .png attachment here ?

Author:  BlindGroup [ Wed Sep 19, 2018 7:39 am ]
Post subject:  Re:

EdLee wrote:
Is .png disallowed for images ?

Ugh, yes. On iOS, a default screenshot is saved as a .jpg.
But iOS's Photos app's Crop function saves it as .png, which is disallowed for image upload here... :-?

Is there a problem with allowing .png attachment here ?


I haven't had a problem uploading png files. I've posted a few images on my journal in this format.

Author:  EdLee [ Wed Sep 19, 2018 3:30 pm ]
Post subject: 

Hi BlindGroup,

Thanks. Were you using iOS Photos to crop a jpg photo, which became a png on your iOS device -- and you were able to upload it here ? :)

Author:  Kirby [ Wed Sep 19, 2018 4:04 pm ]
Post subject:  Re: File attachment types

gif, jpeg, jpg, png, tga, tif, and tiff are the currently allowed image types

Author:  BlindGroup [ Wed Sep 19, 2018 6:32 pm ]
Post subject:  Re:

EdLee wrote:
Hi BlindGroup,

Thanks. Were you using iOS Photos to crop a jpg photo, which became a png on your iOS device -- and you were able to upload it here ? :)


They were crops of screen shots in Windows saved as png.

Author:  ez4u [ Wed Sep 19, 2018 8:11 pm ]
Post subject:  Re: File attachment types

Ed, are you talking about the case of using image tags rather than just "attaching" a png file?

Author:  EdLee [ Wed Sep 19, 2018 10:12 pm ]
Post subject: 

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:
Attachment:
IMG_0295.PNG
IMG_0295.PNG [ 113.22 KiB | Viewed 6670 times ]

Author:  Tryss [ Thu Sep 20, 2018 1:46 am ]
Post subject:  Re: File attachment types

What's the filename extension?

Author:  EdLee [ Thu Sep 20, 2018 2:13 am ]
Post subject: 

Hi Tryss,

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

The error message, raw, uncropped screenshot in post 13 was .PNG.

The iOS Photos cropped photo has an unknown extension, since L19 refuses to upload it ( please see step 5, post 13, of the error message ).

This one off the net is .JPG:
Attachment:
IMG_0278.JPG
IMG_0278.JPG [ 149.31 KiB | Viewed 6649 times ]

Author:  Tryss [ Thu Sep 20, 2018 3:17 am ]
Post subject:  Re:

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.

Author:  EdLee [ Thu Sep 20, 2018 4:37 am ]
Post subject: 

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. )

Author:  BlindGroup [ Thu Sep 20, 2018 6:40 am ]
Post subject:  Re:

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:
Attachment:
8EE69A38-41D9-4298-9EDB-2136F4428B54.jpeg
8EE69A38-41D9-4298-9EDB-2136F4428B54.jpeg [ 200.36 KiB | Viewed 6640 times ]


Seems to work. Although, the system seems to have saved the cropped file as a.jpeg. Phone is running iOS 12.

Author:  BlindGroup [ Thu Sep 20, 2018 7:08 am ]
Post subject:  Re:

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:
Attachment:
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.

Author:  Kirby [ Thu Sep 20, 2018 5:21 pm ]
Post subject:  Re: File attachment types

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.

Page 1 of 2 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/