Fixed: mimetype is deprecated; switching to content_type