I have a cgi script - python fwiw. This script generates a jpg (or png) image. Right now it writes it to the disk with a unique file name, and builds the html sent to the client with a regular img tag to that filename. Then I have a cronjob that runs periodically to clean up all the leftover image files.
It seems there has to be a better way. Is it possible to dump the image straight to the client along with the html instead of writing a file on the disk and linking to it?
It seems there has to be a better way. Is it possible to dump the image straight to the client along with the html instead of writing a file on the disk and linking to it?