Serve static files in Flask from private AWS S3 bucket
问题 I am developing a Flask app running on Heroku that allows users to upload images. The app has a page displaying the user's images in a table. For developing purposes, I am saving the uploaded files to Heroku's ephemeral file system, and everything works fine: the images are correctly loaded and displayed (I am using the last method shown here implying the use of send_from_directory()). Now I have moved the storage to S3 and I am trying to adapt the code. I use boto3 to upload the files to the