This question might seem a little stupid. I’m new to web development and I’m just writing a simple web app to start with. I’m using flask. The app gets some images from some other sites and save them to a folder ‘savedimages’. The problem is after I deploy it on heroku, I can’t open any of the images in the ‘savedimages’ folder. I guess this is because of the chmod of the folder isn’t set to 755 or so… So how do I chmod this folder?
Thanks!
The issue most likely isn’t that the permissions are off – it is most likely that Flask is mounted at the root of your application and you don’t have any rules in your Flask app to serve the images. Try adding a rule to your app:
If it displays, then simply change your return to use
flask.send_file: