Task #3366
Story #3309: get() downloads have inconsistent mime types and filenames
create Python ObjectFormatInfo class to provide mime lookup
100%
Description
We will use utility classes in libclient to provide a consistent lookup service to allow applications to find out the mime type and file extension for formatIDs. Create an ObjectFormatInfo class in Python that provides:
* a static singleton that can be called from anywhere in an application
* function to find the mime type based on a formt identifier string
* function to find the mime type based on an ObjectFormat instance
* function to find the extension based on a formt identifier string
* function to find the extension based on an ObjectFormat instance
* a default set of mapping data that ships with libclient as a CSV file
* the ability for calling applications to set a property (D1Client.resourcesDir) that determines where this CSV data file will live on disk
* the ObjectFormatInfo class should be able to reload itself at runtime, re-reading the CSV file so applications can refresh mappings without a restart
History
#1 Updated by Roger Dahl about 12 years ago
- Status changed from New to In Progress
#2 Updated by Roger Dahl about 12 years ago
- Status changed from In Progress to Closed
- translation missing: en.field_remaining_hours set to 0.0
#3 Updated by Chris Jones almost 12 years ago
- Target version changed from Sprint-2012.44-Block.6.2 to 2013.2-Block.1.1
#4 Updated by Chris Jones over 11 years ago
- Target version changed from 2013.2-Block.1.1 to 2013.12-Block.2.2
#5 Updated by Dave Vieglais over 11 years ago
- Target version changed from 2013.12-Block.2.2 to 2013.35-Block.5.1
#6 Updated by Chris Jones almost 11 years ago
- Target version changed from 2013.35-Block.5.1 to 2014.6-Block.1.3
#7 Updated by Roger Dahl over 10 years ago
- Target version changed from 2014.6-Block.1.3 to 2014.14-Block.2.3
#8 Updated by Dave Vieglais about 10 years ago
- Target version changed from 2014.14-Block.2.3 to CCI-1.4.2
#9 Updated by Dave Vieglais about 10 years ago
- Target version changed from CCI-1.4.2 to CCI-1.5.0
#10 Updated by Dave Vieglais about 10 years ago
- Target version changed from CCI-1.5.0 to CCI-2.0.0