Unggah file permintaan flask ke dropbox
@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)
Good Grouse