5 Replies Latest reply on Nov 13, 2007 5:21 PM by ajohnson1200

    Attachment File Type Icon Resolution

    Ryan Rutan

      This is a request to add functionality to the way ICONs are associated with SkinUtils.getJiveObjectIcon and SkinUtils.getCommonFileExtensionName.

       

      Currently both methods, include hardcoded methods for specific file-types.  In my situation, I work for a company who publishes a programming language platform with its own file-extensions/mime-types.  As such,  we would like to add our standard icons for our file-types to the system such that when our file-types are attached in the system, our icon shows up to the users.

       

       

      Another caveat to this method is that the system assumes that everything uploaded to the system is either a document, spreadsheet, presentation, or compressed file.  Everything else falling into a generic bucket.  Also, with new Microsoft Office extensions (docx,xlsx,etc...), this method is already out of sync.

       

       

       

       

      Please note that I am talking about "icon representation" as a whole, not just Attachments or Documents that are binary uploads.

       

       

       

       

      Currently, I can get the solution I need by creating a new Static Class that wraps SkinUtils checking for my file-types, and then handing off to SkinUtils when no matches are found.  I can then create my own CSS class.  Caveats to this are that I now have to maintain FTL customizations across upgrades (for a simple feature).  I just found the configuration parameters of skin.default.cssLinkPrefix, skin.default.iconURLPrefix, skin.default.iconURLPostfix, and skin.default.mediumIconImage so my previous comments about being "forced" into jive naming standards appear to be premature. Sorry guys.

       

       

       

      Suggestion:

      Change Initialization sequence for getCommonFileExtension to pull from a AttachmentIcons.properties file.  End-Users can override this file if needed on deploy to add/modify desired file-types.  A possibly better alternative, would be an admin component under attachments that allows you to register file extensions and mime-types with class suffixes, that developers could create custom CSS classes to complete the circle.