📅  最后修改于: 2022-03-11 14:47:02.276000             🧑  作者: Mango
@app.route('/uploadtest', methods=['POST', 'GET'])
def get_dropbox_files():
if request.method == 'POST':
uploadedfile = request.files['file']
client = dbx_client
f = secure_filename(uploadedfile.filename)
path="/nameinlights/" + f
dbx_client.files_upload(f.encode(), path)
flash("Added" + " " + f + " " + "to Name in Lights Folder", 'success')
return render_template('uploadtest.html', file_list=file_list)