cancel
Showing results for 
Search instead for 
Did you mean: 

Doc icons based on Name property instead of Content Type...

theorbix
Confirmed Champ
Confirmed Champ
Hello,

I've noticed that in the 2.0x Web Client, the document type icons (showing Word, Excel, Acrobat, and other file formats) depend on the content of the Name property, instead of the Content type.

So, if I upload into an Alfresco repository a document, and I enter "My Presentation.ppt" in the Name property field, I'll see  the PowerPoint icon, as expected.

But as soon as I rename the document name to "My Presentation", the document icon is changed to a generic document icon. Smiley Sad

Is his "by design", or just small bug of the Web client?

In my opinion, the display of document/application icons shold be based on the value set in the Content Type drop down… this would allow users to use document names without the ".doc", ".xls", ".pdf" suffix…
5 REPLIES 5

gavinc
Champ in-the-making
Champ in-the-making
It is by design.

Feel free to raise this as a feature request in JIRA, you'll then be able to track it's progress.

theorbix
Confirmed Champ
Confirmed Champ
It is by design.

Feel free to raise this as a feature request in JIRA, you'll then be able to track it's progress.

Gavin,

Thanks for the prompt reply. I'll post an enhancement request.

What's the rationale for this design, by the way? I found it a bit awkward… so I was wondering what where the reasons "behind the feature"…

kevinr
Star Contributor
Star Contributor
The design choice was made very early in the web-client development. Basically at some points in the stack we only have the object name i.e. "something.txt" - and to work out what actual content object that was to find out the real mimetype (i.e. via a name path lookup of some kind) could be expensive performance wise. So the decision was made to use the file extension (which is always available) to lookup the icon filetype.

Thanks,

Kevin

martin_cowie
Champ in-the-making
Champ in-the-making
Kevin,

I've run into the same exact problem, thankfully this posting answered my prayers quickly enough. While creating my documents via the JCR interface, I have a mimetype value for each one of them. Is there a map( mime-type => suffix ) that I can draw upon to correctly suffix my documents at import? Clearly the webclient uses one …

Cheers,

M.

kevinr
Star Contributor
Star Contributor
Yes there is a public bean service called "MimetypeService" that provides mapping back and forward between extensions and known mimetypes.

Thanks,

Kevin