code: def POST_AUTH(self, courseid, taskid):  # pylint: disable=arguments-differ
          
          if not id_checker(taskid):
              raise Exception("Invalid task id")
  
          self.get_course_and_check_rights(courseid, allow_all_staff=False)
  
          request = web.input(file={})
          if request.get("action") == "upload" and request.get('path') is not None and request.get('file') is not None:
              return self.action_upload(courseid, taskid, request.get('path'), request.get('file'))
          elif request.get("action") == "edit_save" and request.get('path') is not None and request.get('content') is not None:
              return self.action_edit_save(courseid, taskid, request.get('path'), request.get('content'))
          else:
              return self.show_tab_file(courseid, taskid)
docs: Upload or modify a file