def METHOD_NAME(task_id, orthophoto_path, oam_params):
    # Upload to temporary central location since
    # OAM requires a public URL and not all WebODM
    # instances are public
    res = requests.post('https://www.webodm.org/oam/upload',
                        files=[
                            ('file', ('orthophoto.tif', open(orthophoto_path, 'rb'), 'image/tiff')),
                        ]).json()
    task_info = get_task_info(task_id)
    if 'url' in res:
        orthophoto_public_url = res['url']
        logger.info("Orthophoto uploaded to intermediary public URL " + orthophoto_public_url)
        # That's OK... we :heart: dronedeploy
        res = requests.post('https://api.openaerialmap.org/dronedeploy?{}'.format(urlencode(oam_params)),
                            json={
                                'download_path': orthophoto_public_url
                            }).json()
        if 'results' in res and 'upload' in res['results']:
            task_info['oam_upload_id'] = res['results']['upload']
            task_info['shared'] = True
        else:
            task_info['error'] = 'Could not upload orthophoto to OAM. The server replied: {}'.format(json.dumps(res))
            # Attempt to cleanup intermediate results
            requests.get('https://www.webodm.org/oam/cleanup/{}'.format(os.path.basename(orthophoto_public_url)))
    else:
        err_message = res['error'] if 'error' in res else json.dumps(res)
        task_info['error'] = 'Could not upload orthophoto to intermediate location: {}.'.format(err_message)
    task_info['sharing'] = False
    set_task_info(task_id, task_info)