It seems everything is correct, but nothing is downloaded.
Here is my method
@admin.route('/download_doc', methods=['GET', 'POST']) def download_doc(): doc_id = request.json['id'] doc = Doc.query.filter(Doc.id==doc_id).first() filename = doc.filename uploads = os.path.join(app.root_path, app.config['UPLOAD_FOLDER']) return send_from_directory(directory=uploads, filename=filename) It is embarrassing that when I write for print for uploads, the following path is displayed. 
