def METHOD_NAME(url, filename):
    cmd_url = url + '/UploadFile/' # You have to implement @app.route('/Apply/') in server.py part
    fin = open(filename, 'rb')
    files ={'file': fin}
    try:
        r = requests.post(cmd_url, files=files)
        #print(json.loads(r.text))
        print(r.text)
        fin.close()
        return 0
    except:
        fin.close()
        return -1