CKEditor, Roxy Fileman, Add File -upload fails in Firefox

*爱你&永不变心* 提交于 2019-12-12 20:19:30

问题


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.


回答1:


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.




回答2:


The solution from BG101 is working fine. i'm also stuck in uploading png files. with the defaults setting of ckeditor+roxyfileman. maybe u(user2122600) also stuck like me ? do u already try to upload jpg files? it works with me.

hope this helps too.



来源:https://stackoverflow.com/questions/25270254/ckeditor-roxy-fileman-add-file-upload-fails-in-firefox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!