Flask shows TypeError: send_from_directory() missing 1 required positional argument: ‘path’

Solution 1
return send_from_directory(directory=uploads, filename=filename)
return send_from_directory(directory=uploads, path=filename, as_attachment=True)
Solution 2
@app.route('/download/', methods = ["GET", "POST"])
def download(filename):
   uploads = os.path.join(current_app.root_path, "static/pdf/folder_name")
   return send_from_directory(directory=uploads,path=filename,as_attachment=True)