2014-04-27 141 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

是可能的... –