SWFUpload的不会让我从一个服务器上传到另一个 [英] swfupload won't allow me to upload from a server to another one

查看:138
本文介绍了SWFUpload的不会让我从一个服务器上传到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有两个网络服务器和我们有专门的两个服务器之间的任务。
我们决定把所有的ASP / ASPX页面到一个服务器,并把一个upload.aspx + sql server的到另一个问题:

we have two webserver and we have dedicated the task between these two servers. we've decided to put all the asp/aspx page into one server and put an upload.aspx + sql server into another one:

和这里的服务器名称:

http://server1.somecompany.com //这是所有页驻留+ SWFUpload的

http://server1.somecompany.com // this is where all the pages reside + swfupload

http://server2.somecompany.com //这就是upload.aspx和SQL Server驻留

http://server2.somecompany.com // this is where upload.aspx and sql server resides

和这里是内部add_item.asp的code其中Server2中的SWFUpload会打电话给upload.aspx

and here is the code inside add_item.asp where swfupload gonna call upload.aspx from server2

SWFUpload.onload = function () {
    var audio_settings = {
        flash_url : "../script/swfupload.swf",
        upload_url: "http://server2.somecompany.com/upload.aspx", // this is where swfupload from server1 call server 2
        post_params: {
            "ASPSESSID" : "{CDDAF2E2-1178-4465-9842-E54751DE8664}",
            "HELLO-WORLD" : "Here I Am",
            "section" : "sound"
        },

当我点击上传按钮SWFUpload的尝试我的网页重定向到server2.somecompany.com而不能正常完成其工作。

when I click upload button swfupload tries to redirect my page to server2.somecompany.com and doesn't do its job properly

但是当我改变UPLOAD_URL:要成才,如:

but when I change the upload_url : to someting like :

http://server1.somecomapny.com

一切工作正常。

我知道这是一些关于安全问题的SWFUpload,他们已经解决了它这样的,但这固定让我们茫然。

I know it is something about security issue in swfupload and they have solved it like this but this fixation makes us dazed .

我能做些什么呢?

问候。

推荐答案

这是在Flash中的安全措施。您可以配置远程服务器接受这些请求,然而,包括的crossdomain.xml 在服务器的HTML根称为文件。

This is a security measure in Flash. You can configure your remote server to accept these requests, however, by including a file called crossdomain.xml in your server's HTML root.

该文件应该是这个样子:

The file should look something like this:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>

  <allow-access-from domain="[ YOUR SOURCE DOMAIN HERE ]" to-ports="80" />

</cross-domain-policy>

如果您必须允许来自世界各地,用星号代替[源域HERE]*的访问。

If you must allow access from everywhere, replace "[ YOUR SOURCE DOMAIN HERE ]" with an asterisk "*".

有关详细信息,在这里读到:www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html

For more information, read here: www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html

祝你好运!

这篇关于SWFUpload的不会让我从一个服务器上传到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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