Sha256: 068493c044d6cab3cb7697ee46b84557a6f2dc928678ff9c7741e666ab09408a

Contents?: true

Size: 1.38 KB

Versions: 8

Compression:

Stored size: 1.38 KB

Contents

/*
 * jQuery File Upload Plugin JS Example 7.0
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/*jslint nomen: true, unparam: true, regexp: true */
/*global $, window, document */

if($("#fileupload").length != 0) {
    $(function () {
        'use strict';

        // Initialize the jQuery File Upload widget:
        $('#fileupload').fileupload({
            // Uncomment the following to send cross-domain cookies:
            //xhrFields: {withCredentials: true},
//        url: 'server/php/'
        });

        // Enable iframe cross-domain access via redirect option:
        $('#fileupload').fileupload(
            'option',
            'redirect',
            window.location.href.replace(
                /\/[^\/]*$/,
                '/cors/result.html?%s'
            )
        );

        // Load existing files:
        $.ajax({
            // Uncomment the following to send cross-domain cookies:
            //xhrFields: {withCredentials: true},
            url: $('#fileupload').fileupload('option', 'url'),
            dataType: 'json',
            context: $('#fileupload')[0]
        }).done(function (result) {
                $(this).fileupload('option', 'done')
                    .call(this, null, {result: result});
            });
    });
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cg_app_base-1.1.1 app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-init.js
cg_app_base-1.0.78 app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-init.js
cg_app_base-1.0.62 app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-init.js
cg_app_base-1.0.56 app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-init.js
cg_app_base-1.0.55 app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-init.js
cg_app_base-1.0.54 app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-init.js
cg_app_base-1.0.52 app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-init.js
cg_app_base-1.0.51 app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-init.js