[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Serving images

Jumping Arne

1/28/2008 9:44:00 AM

I'm no web programmer so please be kind.

I'm just going to start writing a small "web app", it's very small and will
only do one thing so I'm not going to use some kind of web framework.

The purpose of the script is to do some custom markup of markdown formatted
pages, render them and send them back to the browser. This is fairly simple
and I've done similar things before but this time I'm going to add support
for handling images.

Before I've just placed the images on a server where the script didn't need
to bother about it. Now I'm considering to let the script handle the images
also, that is serve them to the browser when requested. I've tried two
different approaches in other scripts:

+ Put them somewhere outside the scope of the script and link to them.

+ In my own code open the images, read the data and send it back
(is there a library for this?).

Before deciding on how to handle this for this script I would like to ask:
how is this best done? Is there a better way?

1 Answer

Gabriel Genellina

1/28/2008 7:08:00 PM

0

On 28 ene, 07:43, Jumping Arne <arn...@mac.com> wrote:

> Before I've just placed the images on a server where the script didn't need
> to bother about it. Now I'm considering to let the script handle the images
> also, that is serve them to the browser when requested. I've tried two
> different approaches in other scripts:
>
> +       Put them somewhere outside the scope of the script and link to them.
>
> + In my own code open the images, read the data and send it back
>   (is there a library for this?).

For static images, just let the webserver deal with them, surely will
do a better job.

--
Gabriel Genellina