Added media-type checking to archive.