简体   繁体   English

iframe“类似ajax”文件上传-预览

[英]iframe “ajax-like” file upload - preview

I am trying to include a picture uploader in a already existing submission form - Ideally I want it to appear ajax-like so obviously the iframe is the way to go- once uploaded I want it to show a preview of the image uploaded and leave the url for the location of the file in a hidden input 我正在尝试在现有的提交表单中包含图片上传器-理想情况下,我希望它看起来像ajax一样,因此显然iframe是一种上传方式-上传后,我希望它显示上传的图片预览并保留隐藏输入中文件位置的url

I found http://www.uploadify.com/demos/ which seems like it would be my best bet however I cant figure out how to make it display a preview image or leave the url in a hidden input. 我发现http://www.uploadify.com/demos/似乎是我最好的选择,但是我不知道如何使它显示预览图像或将URL保留在隐藏的输入中。 preferably I want an "undo" button in case they selected the wrong file but I'm not picky 最好我要一个“撤消”按钮,以防他们选择了错误的文件,但我不挑剔

anyone know either how to make this happen or of a better option 任何人都不知道如何做到这一点或更好的选择

您可以通过Uploadify的onUploadSuccess事件的data参数返回任何信息,包括文件url。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM