I would like to send dynamically generated images to my users, such as charts, graphs, etc. These images are "discarded" images, they will be sent to only one user and then destroyed, therefore, "no files are used."
I would like to send the image directly to the user without first saving it to the file system. With PHP, this can be achieved by linking the image in your HTML files to a PHP script, for example:
edit: SO swallowed my image tag:
<img src="someScript.php?param1=xyz">
Then the script 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 can I do something like this using a WSGI application. I am currently using the internal Python SimpleWSGI server. I know that this server was mainly intended for demonstration purposes, and not for actual use, since it does not have multithreading capabilities, so please do not tell me this, I know about it, and at the moment it satisfies my requirements :)
Is it really that simple how to put the URL in image tags and process the WSGI request, or is there a better practice?
Does anyone have any experience with this and can give me some pointers (no 32bit, please)
Thanks,
Tom
source share