我正在开发一个模块(在Codeigniter中),用户可以在其中上传图像。他有权查看图像的预览,了解图像将如何显示。我想用ajax来做这件事。
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 ? )发布于 2014-04-27 15:07:05
将镜像上传到您的资源文件夹中,并在表中插入镜像的路径。当你想预览图片时,将链接放入图片标签( <img src="path of the image from table" /> )。
https://stackoverflow.com/questions/23320018
复制相似问题