i'm trying use plupload mvc2 filebrowser-window not open.
my code:
<script type="text/javascript"> // convert divs queue widgets when dom ready $(function () { $("#uploader").pluploadqueue({ // general settings runtimes: 'gears,flash,silverlight,browserplus,html5', url: '<%: url.content( "~//uploades/horses/" ) %>', max_file_size: '10mb', chunk_size: '1mb', unique_names: true, // resize images on clientside if can resize: { width: 320, height: 240, quality: 90 }, // specify files browse filters: [ { title: "image files", extensions: "jpg,gif,png" }, { title: "zip files", extensions: "zip" } ], // flash settings flash_swf_url: '../../../../scripts/plupload/plupload.flash.swf', // silverlight settings silverlight_xap_url: '../../../../scripts/plupload/plupload.silverlight.xap' }); // client side form validation $('form').submit(function (e) { var uploader = $('#uploader').pluploadqueue(); uploader.refresh(); // validate number of uploaded files if (uploader.total.uploaded == 0) { // files in queue upload them first if (uploader.files.length > 0) { // when files uploaded submit form uploader.bind('uploadprogress', function () { if (uploader.total.uploaded == uploader.files.length) $('form').submit(); }); uploader.start(); } else alert('you must @ least upload 1 file.'); e.preventdefault(); } }); });
<div id="uploader" style="height:300px"> <p>you browser doesn't have flash, silverlight, gears, browserplus or html5 support.</p> </div>
if try debug uploadingelemt showen out problems. if click add files window jumps top of page , nothin else happens.
firebug not show problems.
i've tried in ff4 & ie 8 using flash , silverlight
any 1 idea? thank , wish nice weekend!
your browser use flash runtime listed before 'html5'. flash runtime requires setting of 'container: "my_uploader_container_id"'
and 'pickfiles' button need placed div id 'my_uploader_container_id'.
another solution using html5 engine - list before flash in 'runtimes' parameter. html5 runtime not work in ie.
Comments
Post a Comment