alternative sync or async
automatically detect MIME type by MIME::Types
changed content-disposition to attachment