Cross Domain Boot Issues

I am using a django plugin called django-filebrowser which uses uploadify. The problem I am facing is that I host uploadify.swf on a remote static media server, while my administration area is on my django server.

At first, the button browsewill not cause my browser to load. I fixed this by changing sameScriptAccessto alwaysinstead sameDomain. Now the progress bar does not move at all, I probably need to enable some server settings for downloading files with multiple domains, or, most likely, actually place a separate downloadable script file on my media server.

I thought I could solve this problem by adding crossdomain.xmlto enable any site at the root of both servers, but this does not seem to solve the problem.

$(document).ready(function() {
    $('#id_file').uploadify({
        'uploader'          : 'http://media.site.com:8080/admin/filebrowser/uploadify/uploadify.swf',
        'script'            : '/admin/filebrowser/upload_file/',
        'scriptData'        : {'session_key': '...'},
        'checkScript'       : '/admin/filebrowser/check_file/',
        'cancelImg'         : 'http://media.site.com:8080/admin/filebrowser/uploadify/cancel.png',
        'auto'              : false,
        'folder'            : '',
        'multi'             : true,
        'fileDesc'          : '*.html;*.py;*.js;*.css;*.jpg;*.jpeg;*.gif;*.png;*.tif;*.tiff;*.mp3;*.mp4;*.wav;*.aiff;*.midi;*.m4p;*.mov;*.wmv;*.mpeg;*.mpg;*.avi;*.rm;*.pdf;*.doc;*.rtf;*.txt;*.xls;*.csv;',
        'fileExt'           : '*.html;*.py;*.js;*.css;*.jpg;*.jpeg;*.gif;*.png;*.tif;*.tiff;*.mp3;*.mp4;*.wav;*.aiff;*.midi;*.m4p;*.mov;*.wmv;*.mpeg;*.mpg;*.avi;*.rm;*.pdf;*.doc;*.rtf;*.txt;*.xls;*.csv;',
        'sizeLimit'         : 10485760,
        'scriptAccess'      : 'always',
        //'scriptAccess'      : 'sameDomain',
        'queueSizeLimit'    : 50,
        'simUploadLimit'    : 1,
        'width'             : 300,
        'height'            : 30,
        'hideButton'        : false,
        'wmode'             : 'transparent',
        translations        : {
                              browseButton: 'BROWSE',
                              error: 'An Error occured',
                              completed: 'Completed',
                              replaceFile: 'Do you want to replace the file',
                              unitKb: 'KB',
                              unitMb: 'MB'
        }
    });
    $('input:submit').click(function(){
        $('#id_file').uploadifyUpload();
        return false;
    });
});

The page I'm viewing is http://site.com/admin/filebrowser/browseon port 80.

+3
source share
1 answer

Does local help support SWF?

0
source

Source: https://habr.com/ru/post/1731712/


All Articles