how to get transform a local image to a web accessable image

Posted by hguser on Stack Overflow See other posts from Stack Overflow or by hguser
Published on 2010-12-23T14:37:57Z Indexed on 2010/12/23 14:54 UTC
Read the original article Hit count: 194

Filed under:
|
|

Hi:

Generally,if we want to display a image in the web page,we give the uri of the image resource like: http://host:port/image/xxx.jpg.

Now,there are some images in my file system,and I save its absolute path in the db.

Like this;

id     name     address   image
1      xxxx     xxxx      C:/images/xxx.jpg

Now if the entity is retrived,its image should be displayed in the page.

How to make it?

What I thought is copy the image under the web server dir,then build its url,then the page can render it. But I wonder if this is a good idea? Is there any other way?

© Stack Overflow or respective owner

Related posts about database

Related posts about image