I am trying to upload and file and download a file. I can upload the file but i can not download the file.
Below is my project structure:
Below is my UPLOAD_FOLDER details and download or view end point:
in below code name=filename
UPLOAD_FOLDER = os.path.join('app1/static')
@bp.route('/uploads/<name>')
def download_file(name):
print(UPLOAD_FOLDER, name)
return send_from_directory(UPLOAD_FOLDER, name)