jsp页面的路径为: /uploadDemo/WebRoot/pages/data/upload.jsp
uploadify.swf的路径为: /uploadDemo/WebRoot/uploadify/uploadify.swf
upload.jsp页面中有:
<script type="text/javascript"> $(document).ready(function(){ $("#fileUpload").uploadify({ 'buttonText':"选择文件", 'buttonCursor':'hand', 'buttonClass':"some-class", 'auto':false, 'swf':"<%=request.getContextPath() %>/uploadify/uploadify.swf", 'uploader':"manyAjaxUploadFile_uploadManyFile.action", 'multi':"true", 'queueSizeLimit':10, 'fileSizeLimit':"10MB", 'fileObjName':"uploadImages", 'removeCompleted':false, 'progressData':"speed", 'onUploadProgress' : function(file, bytesUploaded, bytesTotal, totalBytesUploaded, totalBytesTotal) { $('#progress').html(totalBytesUploaded + ' bytes uploaded of ' + totalBytesTotal + ' bytes.'); } }); }); </script> <input id="fileUpload" type="file" name="fileUpload" /><input class="btn btn-blue" style="width: 100px;" onclick="javascript:$('#fileUpload').uploadify('upload','*')" type="button" value="全部上传" /><input id="delUploadRecord" class="btn btn-blue" style="width: 100px;" onclick="javascript:$('#fileUpload').uploadify('cancel','*')" type="button" value="删除上传记录" /></p> <p> </p>
功能正常,但为什么加载页面的时候会报 GET http://localhost:8080/cloud/pages/data/ 404 (Not Found)?
也是遇到这个问题了,您解决了吗?
在jquery.uploadify.min.js中找到:
this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url);
替换为:
this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
this.settings.button_image_url = this.settings.button_image_url ? SWFUpload.completeURL(this.settings.button_image_url) : this.settings.button_image_url
@luzemin: 没用呀