我在尝试使用plupload和jquery ui dialog上传时遇到问题。
我有一个用 jqueryui 构建的模态对话框,并且我在其中添加了一个 plupload 布局。
但是当我用 Firefox 尝试它时,它会打开 me 2 对话框,而用 Safari 则它不起作用。
我已经看到生成的代码,我已经看到在 Firefox 中我有 2
<div id="p16r5em3ep2gmrvk1ad335d1sae0_html5_container" style="position: absolute; background: none repeat scroll 0% 0% transparent; width: 0px; height: 0px; overflow: hidden; z-index: -1; opacity: 0; top: 0px; left: 0px;" class="plupload html5">
<input type="file" multiple="multiple" accept="" style="font-size: 999px; position: absolute; width: 100%; height: 100%;" id="p16r5em3ep2gmrvk1ad335d1sae0_html5">
</div>
而第二个
<div id="p16r5em3i11ila2j0b91i163s44_html5_container" style="position: absolute; background: none repeat scroll 0% 0% transparent; width: 0px; height: 0px; overflow: hidden; z-index: -1; opacity: 0; top: 0px; left: 0px;" class="plupload html5">
<input type="file" multiple="multiple" accept="" style="font-size: 999px; position: absolute; width: 100%; height: 100%;" id="p16r5em3i11ila2j0b91i163s44_html5">
</div>
对于 Safari,我有...
<div id="p16r5fjomdg751e101jao122t12gd0_html5_container" style="position: absolute; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; overflow-x: hidden; overflow-y: hidden; opacity: 0; top: 0px; left: 0px; width: 0px; height: 0px; z-index: -1; background-position: initial initial; background-repeat: initial initial; " class="plupload html5">
<input id="p16r5fjomdg751e101jao122t12gd0_html5" style="font-size: 999px; position: absolute; width: 100%; height: 100%; " type="file" accept="" multiple="multiple">
</div>
而第二个
<div id="p16r5fjong1g231iqm10sq1jte1nc34_html5_container" style="position: absolute; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; overflow-x: hidden; overflow-y: hidden; opacity: 0; top: 0px; left: 0px; width: 0px; height: 0px; z-index: -1; background-position: initial initial; background-repeat: initial initial; " class="plupload html5">
<input id="p16r5fjong1g231iqm10sq1jte1nc34_html5" style="font-size: 999px; position: absolute; width: 100%; height: 100%; " type="file" accept="" multiple="multiple">
</div>
但一切都不是正确的。
请注意,如果我不使用模态对话框,它可以工作......
编辑 我使用此代码来初始化 plupload
var uploader = new plupload.Uploader ({
runtimes: 'html5,flash',
container:'container',
drop_element:'upDropArea',
browse_button: 'upBrowseButton',
url: 'url&action=action',
flash_swf_url: '/lib/plupload/js/plupload.flash.swf',
multipart: true,
urlstream_upload:true,
resize : {quality : 60},
multiple_queues: true,
filters : [
{title: 'Images', extensions: 'jpg,gif,png,jpeg'}
]
});
任何的想法?
谢谢大家