Flask-Images icon indicating copy to clipboard operation
Flask-Images copied to clipboard

Send from directory

Open johnroper100 opened this issue 5 years ago • 2 comments

Hi, can you do this with send_from_directory?

johnroper100 avatar Apr 15 '19 00:04 johnroper100

Can you explain further?

mikeboers avatar Apr 15 '19 19:04 mikeboers

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

johnroper100 avatar Apr 15 '19 20:04 johnroper100