python - Download file on heroku -


i have simple function in flask app.

@app.route('/download') @login_required def download():     url="some_random_video_url_here"     re = requests.get(url)     open("download/hello.mp4", 'wb') file: #save hello.mp4 download folder         file.write(re.content)         file.close() flash("done downloading.") return render_template('download.html') 

when run app locally, download function run fine. when deploy code heroku , access url, 500 internal server error

i think has file system on heroku don't know how make work. how?


Comments