CKEditor,Roxy Fileman,Firefox中添加文件上传失败 [英] CKEditor, Roxy Fileman, Add File -upload fails in Firefox

查看:382
本文介绍了CKEditor,Roxy Fileman,Firefox中添加文件上传失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Roxy文件管理器插件CKEditor。在文件管理器对话窗口,当我使用添加文件按钮上传文件到服务器,它在IE11和Chrome中工作正常。 Firefox虽然无法上传文件。



我一直在调试Fileman的源代码,我猜这个问题是在main.js中的(我正在使用最小化版本main。 min.js)。在功能addFile()中下一个代码部分:

 如果(!RoxyFilemanConf.UPLOAD){
警报(吨(E_ActionDisabled))
}
else {
console.log(document.forms.addfile);
document.forms.addfile.action = RoxyFilemanConf.UPLOAD;
console.log(document.forms.addfile);
document.forms.addfile.submit();



$ b我已经添加了我的调试(console.log)。看来Firefox并没有为addfile形式添加动作,因为调试在添加之前和之后给出了相同的内容:

 < ; form id =frmUploadenctype =multipart / form-datatarget =frmUploadFilemethod =postname =addfile> 

有没有其他人遇到这个问题,或者是否有人知道在处理这种代码时有什么不同在Firefox?



任何建议,如何找到这样做的原因不能在Firefox工作?



Filemans上传。 PHP是未加载可言,因为对于形式不添加操作。

解决方案

我是有这个问题,并固定其与此: -

  $( '形式[名称= addfile]')ATTR( '动作',RoxyFilemanConf.UPLOAD ); 

而不是

  document.forms.addfile.action = RoxyFilemanConf.UPLOAD; 

希望这有助于。


I am using CKEditor with Roxy File Manager -plugin. In the file manager dialog window, when I use the Add File -button to upload a file into server, it works fine in IE11 and Chrome. Firefox though fails to upload the file.

I have been debugging the source of Fileman and I guess the problem is in main.js (I'm using minimized version main.min.js). In function addFile() in the next code part:

if(!RoxyFilemanConf.UPLOAD){
    alert(t("E_ActionDisabled"))
}
else{
    console.log(document.forms.addfile);
    document.forms.addfile.action=RoxyFilemanConf.UPLOAD;
    console.log(document.forms.addfile);
    document.forms.addfile.submit();
}

I have added my debugging (console.log). It seems that Firefox fails to add action for the addfile form, since the debug gives same content before and after the adding:

<form id="frmUpload" enctype="multipart/form-data" target="frmUploadFile" method="post" name="addfile">

Have anyone else encountered this problem, or does anyone know if there's something different in handling this kind of code in Firefox?

Any suggestions how to find the reason for this not working in Firefox?

Filemans upload.php is not loaded at all, since action is not added for the form.

解决方案

I was having this issue and fixed it with this:-

 $('form[name="addfile"]').attr('action', RoxyFilemanConf.UPLOAD);

instead of

 document.forms.addfile.action=RoxyFilemanConf.UPLOAD;

Hope this helps.

这篇关于CKEditor,Roxy Fileman,Firefox中添加文件上传失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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