[ckan-dev] mimetype suggestion in package creation

Flavio Coelho fccoelho at gmail.com
Tue May 31 10:52:54 UTC 2011


Hi,

just a quick suggestion of a little feature which would make life for
package creators and maintainers a bit easier.

I have done a quick ticket search about it and have found nothing, so
here it is:

Python Standard library has a module called mimetypes. I suggest using
it to auto-fill the mimetype field for resources. mimetypes can
recognize a large number of mimetypes (see mimetypes.types_map) with
mimetypes.guess_type, and new ones can be added with
mimetypes.add_type.

Naturally when mimetypes fails to guess the file type, the user would
be allowed to fill it in as is currently the norm.

what do you think about it?

-- 
Flávio Codeço Coelho
================
+55(21) 3799-5567
Professor
Escola de Matemática Aplicada
Fundação Getúlio Vargas




More information about the ckan-dev mailing list