def METHOD_NAME(self, token, gpx_file):
    gpx = None
    upload_id = 0
    try:
        with open(gpx_file) as f:
            gpx = f.read()
    except:
        pass
    if gpx is not None and gpx.strip() != '':
        values = { 'token': token, 'type': 'gpx', 'data': gpx }
        result = self.get_web_data(UPLOAD_URL, values, "Uploading record...")
        upload_id = result['upload_id']
    return upload_id