This documentation is for the old version. Go to the latest Upload Suite docs

Using Host and Upload Domains that Differ from One Another

Usually Adobe Flash Player does not allow an swf application to access data that resides outside the domain where the application is hosted. It means that you usually cannot host Image Uploader Flash in the one domain and upload files to another. However, you can manage this task by implementing cross-domain policy for Flash applications.

To allow Image Uploader Flash to upload files to some target server you should create the cross-domain policy file, named crossdomain.xml, and place it to the root folder of the target server.

Suppose, Image Uploader Flash is hosted in a server, whereas it requires to upload files to a server. In this case files should be placed as follows:

the Flash control
a page where Image Uploader Flash is hosted
the cross-domain policy file
an upload script; aimed to save files and/or get additional data

The cross-domain policy file have to be like in the snippet below:

   <site-control permitted-cross-domain-policies="all"/>
   <allow-access-from domain="" to-ports="*"/>
   <allow-http-request-headers-from domain="" headers="*"/>

And Image Uploader Flash should be configured like follows:

<aur:ImageUploaderFlash ID="Uploader1" runat="server" 
   <UploadSettings ActionUrl="" />
   $uploader = new ImageUploaderFlash("Uploader1");
 var fu = $au.imageUploaderFlash({
	id: 'Uploader1',
	uploadSettings: { actionUrl:"" }

Pay attention that you will need a license key for the target domain too! So, you will need to register two license keys: the first one for the domain where Image Uploader Flash is hosted, and the second one for the domain where files are uploaded to. See the Evaluating and Registering Image Uploader Flash topic for more information.

See Also



Other Resources