Not sure if this is a bug....

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

Not sure if this is a bug....

Postby kabads on Sat Dec 03, 2011 2:40 am

It's not the linux mint distribution - that's working fine and well documented.

However, I'm trying to upload a 100x100px <100k .jpg image to the http://community.linuxmint.com site. When I upload the file with an extension of .JPG (uppercase) the site rejects the file. Changing the file extension means the file can be uploaded. Is this a usability bug?
Image
kabads
Level 3
Level 3
 
Posts: 121
Joined: Thu Dec 01, 2011 2:01 pm

Linux Mint is funded by ads and donations.
 

Re: Not sure if this is a bug....

Postby Aging Technogeek on Sat Dec 03, 2011 4:28 am

The extension ".JPG" is an invalid extension. Linux is case sensitive, so .JPG is not the same as .jpg.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4604
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Not sure if this is a bug....

Postby kabads on Sat Dec 03, 2011 5:15 am

Aging Technogeek wrote:The extension ".JPG" is an invalid extension. Linux is case sensitive, so .JPG is not the same as .jpg.


What or who recognises uppercase file extensions as an invalid extension? I am aware that linux is case sensitive, but not that having uppercase as a file extension makes it invalid. For example, nautilus recognises files with uppercase extensions - and indeed linux allows files with uppercase extensions, so I'm not sure what you mean when you say it's an invalid file extension?
Image
kabads
Level 3
Level 3
 
Posts: 121
Joined: Thu Dec 01, 2011 2:01 pm

Re: Not sure if this is a bug....

Postby Aging Technogeek on Sat Dec 03, 2011 6:55 am

What I mean is that .JPG and .jpg are not interchangeable. The proper file extension for a certain type of picture file is .jpg. The file system will not accept .JPG instead.

.JPG is a valid file extension, just not for the file type you are working with.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4604
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Not sure if this is a bug....

Postby kabads on Sat Dec 03, 2011 8:48 am

I can accept that - thanks for clarifying. However, I'm not sure if everyone will see it as that - e.g. a newbie who is coming to linux. Some cameras (e.g. Canon) throw out files in .JPG format, which will need a rename before they are usable on the community site. Would it be better to accept .JPG as well? Even nautilus accepts and recognises these .JPG files, so they won't think to rename it as it appears like an image.
Image
kabads
Level 3
Level 3
 
Posts: 121
Joined: Thu Dec 01, 2011 2:01 pm

Re: Not sure if this is a bug....

Postby Aging Technogeek on Sat Dec 03, 2011 9:06 am

I see what you are getting at now. It is really not something that can be readily addressed in Mint, or any Linux distro since it is a basic principle of the file handling protocol. Someone would need to write a script to change the extension automatically when the .JPG files are downloaded from the camera. And this would probably be of limited usefulness since it would be specific to one file extension. (I assume this would be the case. I am not a script writer so I cannot say for certain)

It is most likely easier to educate new users to the Linux file system so they know these things and can make the required changes as needed.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4604
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Not sure if this is a bug....

Postby kabads on Sat Dec 03, 2011 9:32 am

Wouldn't it be easier to change the script that runs on the webserver so that it accepts the .JPG extension? That would be much simpler to do.
Image
kabads
Level 3
Level 3
 
Posts: 121
Joined: Thu Dec 01, 2011 2:01 pm

Re: Not sure if this is a bug....

Postby SimonTS on Sat Dec 03, 2011 9:44 am

Good idea...

...but then everybody would be expecting the webserver (and probably Linux in general) to accept .jpG .jPg .Jpg .JPg .JpG .jPG as well as the same combinations for every other file extension out there :shock:
User avatar
SimonTS
Level 6
Level 6
 
Posts: 1272
Joined: Thu Feb 24, 2011 5:19 pm
Location: Bristol, United Kingdom

Re: Not sure if this is a bug....

Postby kabads on Sat Dec 03, 2011 5:35 pm

SimonTS wrote:Good idea...

...but then everybody would be expecting the webserver (and probably Linux in general) to accept .jpG .jPg .Jpg .JPg .JpG .jPG as well as the same combinations for every other file extension out there :shock:


That would be easily done with some regex work. What would be the problem of accepting all those combinations by the webserver? I can't think of any. I'm pretty sure that Linux doesn't give a stuff about any particular file extension for a .jpg file or for any other non-kernel related file for that matter - so I'm almost certain the kernel hackers don't give a fig about what file extensions are used for graphics.
Image
kabads
Level 3
Level 3
 
Posts: 121
Joined: Thu Dec 01, 2011 2:01 pm

Re: Not sure if this is a bug....

Postby kabads on Sat Dec 03, 2011 5:41 pm

Kristian sums it up well in this bug reply:

https://bugs.launchpad.net/community.li ... bug/677636
Image
kabads
Level 3
Level 3
 
Posts: 121
Joined: Thu Dec 01, 2011 2:01 pm

Re: Not sure if this is a bug....

Postby bjd-pfq on Fri Feb 01, 2013 10:41 am

SimonTS wrote:Good idea...

...but then everybody would be expecting the webserver (and probably Linux in general) to accept .jpG .jPg .Jpg .JPg .JpG .jPG as well as the same combinations for every other file extension out there :shock:


You can hardly be sillier in your answer.
Parent poster already explained that some camera's throw out IMG1234.JPG files. Upper case that is.
My Pentax does that as well.

You are not telling me they aren't images just because you proclaim JPG to be an invalid extension. The latter is a neo-UNIX-newbie's typical pitfal.

If I want JPG's to be image files (for all I care they could be read right from the SD-card) and the 'system' doesn't provide for it, the system
has a shortcoming that needs to be fixed.
Typically under UNIX we make a fix a flexible one: allow the user --who came to UNIX for that power and to be treated as an informed conscious
adult that knows what she wants--, allow the user I repeat for instance to add a string to a plain text file listing extensions for images to be recognized.

What list?, where? -- that's something the person that broke this should know.

--
bjd-pfq
Level 1
Level 1
 
Posts: 5
Joined: Fri Dec 14, 2012 10:46 pm

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot], Hecubus, UgoRipley and 21 guests