<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_on_task(self, task_id, file_content, file_name, file_content_type=None, **options):
 """Upload an attachment for a task. Accepts a file object or string, file name, and optional file Content-Type"""

        path = '/tasks/%d/attachments' % (task_id)
        return self.client.request('post', path, files=[('file', (file_name, file_content, file_content_type))], **options)