how would i add serving static files with return file(filename) in the posts endpoint to return images for the posts
anonhacker47 opened this issue · comments
Returning a file is not a great idea. The post should return image URLs, which I guess you can generate with url_for()
. Then for development Flask serves these images, but in production you have a file server that gets these before they get to Flask. For example nginx.