'Returns the mime type of the data'

def get_mime(self):

    try:
        return _get_datatypes_registry().get_mimetype_by_extension(self.extension.lower())
    except AttributeError:
        return 'data'
