我正在处理用户上传图像的模块(在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 ? )
答案 0 :(得分:0)
上传资产文件夹中的图像,然后在表格中插入图像的路径。如果要预览图像,请将链接指定为图像标记(<img src="path of the image from table" />
)。