flask request file upload to dropbox

Solutions on MaxInterview for flask request file upload to dropbox by the best coders in the world

showing results for - "flask request file upload to dropbox"
Anton
18 Aug 2017
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)
similar questions
queries leading to this page
flask request file upload to dropbox