jquery - Using Uploadify with Spring MVC -
jquery - Using Uploadify with Spring MVC -
i trying utilize uploadify plugin spring mvc in order upload bunch of files. authenticated request keeps getting denied because when flash based plugin makes request, lacking session id. there bunch of examples on how create work php.. couldn't find help case in forum. ideas?
$('#uploadify_upload').uploadify({ 'uploader' : '../js/uploadify.swf', 'script' : '/myproj/fileuploader/upload, 'cancelimg' : '../images/uploadify-cancel.png', 'auto' : false, 'multi' : true, 'scriptaccess' : 'always', 'checkexisting': false, 'oncomplete' : function(event,id,fileobj,response,data) { alert("complete"); }, 'onerror' : function(event,id,fileobj,errorobj){ alert("error"); } }); }); function handle(){ $('#uploadify_upload').uploadifyupload(); }
html:
<div> <input id="uploadify_upload" name="uploadify_upload" type="file" /> </div> <div> <input type="submit" value="submit" name="submit" onclick="handle()"/> </div>
you should alter script append jsessionid name of uploadify swf, similar solution suggested on for swf uploader tool.
so, should work (assuming javascript note above located in jsp):
$('#uploadify_upload').uploadify({ 'uploader' : '../js/uploadify.swf?<%=request.getsession().getid()%>',
if not generating javascript jsp, you'll have figure out how jsessionid javascript calling uploadify - may need introduce parameter function wraps uploadify, etc.
jquery spring-security uploadify
Comments
Post a Comment