def content_type_from_filename(filename):
    """Determined content type from 'filename'"""
    if filename:
        if filename.endswith('.rst'):
            return 'text/x-rst'
        if filename.endswith('.md'):
            return 'text/markdown'
    return None
