ajaxFileUpload无法在Chrome,Firefox中使用 [英] ajaxFileUpload not working in chrome,firefox

查看:116
本文介绍了ajaxFileUpload无法在Chrome,Firefox中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在使用$ .ajaxFileUpload在我的MVC应用程序中上传文件.我在IE8中工作,但在google chrome和firefox中工作.
这是我的代码,请检查一下,让我知道我错过的所有内容

Hi all,
I am using $.ajaxFileUpload to upload the files in my MVC application.I worked in IE8 but not working in google chrome and firefox.
This is my code pls check it and let me know anything i missed out

$.ajaxFileUpload
           (
              {
                                    url: ''ManageEmployeeDocuments'',
                                    secureuri: false,
                                    fileElementId: ''employeeDocumentsId'',
                                    dataType: ''text/html'',
                                    success: function (data, status) {
                                        // we are manually adding the form tag again because it gets deleted when we post once using the ajaxuploadjquery
                                        $("#EmployeeDocuments").html(''<form method="post" id="employeeDocumentsId" enctype="multipart/form-data" action="/">'' + data);
                                    },
                                    error: function (data, status, e) {
                                        alert(e);
                                    }
                                }
                            )

推荐答案

.ajaxFileUpload将文件上传到我的MVC应用程序中.我在IE8中工作,但在google chrome和firefox中工作.
这是我的代码,请检查一下,让我知道我错过的所有内容
.ajaxFileUpload to upload the files in my MVC application.I worked in IE8 but not working in google chrome and firefox.
This is my code pls check it and let me know anything i missed out


.ajaxFileUpload ( { url: ''ManageEmployeeDocuments'', secureuri: false, fileElementId: ''employeeDocumentsId'', dataType: ''text/html'', success: function (data, status) { // we are manually adding the form tag again because it gets deleted when we post once using the ajaxuploadjquery
.ajaxFileUpload ( { url: ''ManageEmployeeDocuments'', secureuri: false, fileElementId: ''employeeDocumentsId'', dataType: ''text/html'', success: function (data, status) { // we are manually adding the form tag again because it gets deleted when we post once using the ajaxuploadjquery


("#EmployeeDocuments").html(''<form method="post" id="employeeDocumentsId" enctype="multipart/form-data" action="/">'' + data); }, error: function (data, status, e) { alert(e); } } )
("#EmployeeDocuments").html(''<form method="post" id="employeeDocumentsId" enctype="multipart/form-data" action="/">'' + data); }, error: function (data, status, e) { alert(e); } } )


这篇关于ajaxFileUpload无法在Chrome,Firefox中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆