1@app.route('/uploadtest', methods=['POST', 'GET'])
2def get_dropbox_files():
3 if request.method == 'POST':
4 uploadedfile = request.files['file']
5 client = dbx_client
6 f = secure_filename(uploadedfile.filename)
7 path="/nameinlights/" + f
8 dbx_client.files_upload(f.encode(), path)
9 flash("Added" + " " + f + " " + "to Name in Lights Folder", 'success')
10
11
12 return render_template('uploadtest.html', file_list=file_list)