使用REST Alfresco进行跨域调用 [英] cross domain call using REST Alfresco

查看:102
本文介绍了使用REST Alfresco进行跨域调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用REST API上传文件。 http://fiddle.jshell.net/876fzzd5/5/ 是粘贴框。

I am using the REST API to upload a file. http://fiddle.jshell.net/876fzzd5/5/ is the pastebin.

我正在使用 http:// malsup。 com / jquery / form /#file-upload 表单插件来上传跨域。

I am using http://malsup.com/jquery/form/#file-upload form plugin to upload cross domain.

IE调试工具显示从服务器接收到正确的响应。但是,即使文件上传失败,也会始终调用成功回调。如果我不使用跨域Ajax调用,则会调用正确的回调方法(成功/错误)。

IE debug tools shows that the correct response is received from the server. However the success callback is always called even if the file upload fails. If I don't use a cross domain Ajax call then the correct callback methods (success/error) are called.

有人可以让我知道可能是什么问题吗? ?

Could some one let me know what might be the issue?

推荐答案

这是CORS过滤器问题吗?如果是这样,我在户外安装的话,在web.xml文件中将CORS过滤器注释掉了。我要做的就是取消过滤器的注释。另外,这是一则帖子,向您展示如何将CORS过滤器(如果尚未安装)放入其中:
http://www.slideshare.net/jottley/cors-enable-alfresco-for-cors

Is this a CORS filter problem? If so, my installation of alfresco had the CORS filter commented out in the web.xml file. All I had to do was uncomment the filter. Also here is a post that shows you how to put the CORS filter in if it is not already there: http://www.slideshare.net/jottley/cors-enable-alfresco-for-cors

这篇关于使用REST Alfresco进行跨域调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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