首页新闻找找看学习计划

uploadify中添加swf路径页面报错

0
[待解决问题]

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>&nbsp;</p>

功能正常,但为什么加载页面的时候会报 GET http://localhost:8080/cloud/pages/data/ 404 (Not Found)?

筱筱清流水的主页 筱筱清流水 | 菜鸟二级 | 园豆:202
提问于:2013-06-09 13:50
< >
分享
所有回答(1)
0

也是遇到这个问题了,您解决了吗?

代码&优雅着&生活 | 园豆:202 (菜鸟二级) | 2015-08-20 15:37

在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 

支持(0) 反对(0) luzemin | 园豆:21 (初学一级) | 2016-06-07 10:41

@luzemin: 没用呀

支持(0) 反对(0) 一世荣华 | 园豆:200 (初学一级) | 2017-09-08 16:55
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册