Take out attachment in various file formats