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.
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.