Added the ability to pass a file like object to upload_attachment, in addition to a file path.