I am trying to convert an API created in Flask into FastAPI, which demonstrates how to download a file from the server; however, I don't know how to change the code below:
@app.route('/download/<fname>', methods=['GET'])
def download(fname):
return send_file(fname)
Thanks in advance.