Hello there fellow SOers,
I would like to send dynamically created images to my users, such as charts, graphs etc. These images are "throw-away" images, they will be only sent to one user and then destroyed, hence the "no files involved".
I would like to send the image directly to the user, without saving it on the file system first. With PHP this could be achieved by linking an image in your HTML files to a PHP script such as:
edit: SO swallowed my image tag:
<img src="someScript.php?param1=xyz">
The script then sent the correct headers (filetype=>jpeg etc) to the browser and directly wrote the image back to the client, without temporarily saving it to the file system.
How could I do something like this with a WSGI application. Currently I am using Python's internal SimpleWSGI Server. I am aware that this server was mainly meant for demonstration purposes and not for actual use, as it lacks multi threading capabilities, so please don't point this out to me, I am aware of that, and for now it fulfills my requirements :)
Is it really as simple as putting the URL into the image tags and handling the request with WSGI, or is there a better practise?
Has anyone had any experience with this and could give me a few pointers (no 32Bit ones please)
Thanks,
Tom