code: def put_attachment(self, id, filename, file, content_type, include_online=False):
          
          return self.put_attachment_data(id, filename, file.read(), content_type, include_online=include_online)
docs: Upload an attachment to the Xero object (from file object).