mikeboers / Flask-Images

On-demand resizing of images for Flask applications.
https://mikeboers.github.io/Flask-Images/
BSD 3-Clause "New" or "Revised" License
81 stars 43 forks source link

Send from directory #52

Open johnroper100 opened 5 years ago

johnroper100 commented 5 years ago

Hi, can you do this with send_from_directory?

mikeboers commented 5 years ago

Can you explain further?

johnroper100 commented 5 years ago

I have an endpoint for example /test_images/itemid/imagename.jpg

That endpoint grabs the item from the database and then using the database it puts together a path that is sent to send_from_directory and returns the proper file

For that example above, the path that is sent to send_from_directory is imgpath/item.createdmonth/item.createdyear/imagename.jpg

I need to be able to run queries but I still want to reszie the resulting image