code: def create_on_task(self, task_id, file_content, file_name, file_content_type=None, **options):
          
          path = '/tasks/%d/attachments' % (task_id)
          return self.client.request('post', path, files=[('file', (file_name, file_content, file_content_type))], **options)
docs: Upload an attachment for a task. Accepts a file object or string, file name, and optional file Content-Type