file storage currently does something a bit weird which has caused errors in the past, and still doesn't seem quite right: when uploading a file, the system :
- tries to look up the mimetype using the cr_mime_types
- if it fails, tries to guess the mimetype using ns_guesstype (which basically looks at the AOLserver config file).
- if it finds a mime type, it inserts it into cr_mime_types
It doesn't seem right for code to randomly update cr_mime_types. Also, the only time new mime types might show up from ns_guesstype is if new ones have been added to AOLserver.
I've implemented and tested a local fix that changes acs-content-repository and file-storage:
- on boot time, acs-content-repository scans AOLserver declared mime types and inserts them into cr_mime_types if necessary
- file storage simply looks things up in cr_mime_types, never trying to insert new types along the way.
If people think this is the right way to go, I'll commit my fix (to HEAD not the 4.6 branch, seems like too big a change for the 4.6 branch).