Add mimetype detection to downloads.