2014-04-27 140 views
0

我正在模块(在Codeigniter中)用户上传图像。他有幸看到图像预览将如何显示。我想阿贾克斯做这个。加载图像预览Codeigniter

 1. Is is necessary to upload the image (ie save image in our database , get the url where it is stored and Load the image) to load the preview of the image. 

     2. Is there any other way through which I can display the preview without storing the image in our database. (Getting the url from the client side and displaying it.. How to do this ?) 

回答

0

上传资产文件夹中的图片,并在表格中插入图片路径。当您想要预览图像时,将链接指向图像标签(<img src="path of the image from table" />)。

+0

雅...它就像我想显示的图像没有上传到数据库中。是否有可能这样做? –

+0

是可能的... –