﻿/*
 * jQuery File Upload Plugin JS Example
 * 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
 */

/* global $, window */

$(function () {
    'use strict';

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

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

    // Load existing files:
    $('#fileupload').addClass('fileupload-processing');
    $.ajax({
        // Uncomment the following to send cross-domain cookies:
        //xhrFields: {withCredentials: true},
        url: $('#fileupload').fileupload('option', 'url'),
        dataType: 'json',
        context: $('#fileupload')[0]
    }).always(function () {
        $(this).removeClass('fileupload-processing');
    }).done(function (result) {
        $(this).fileupload('option', 'done')
            .call(this, $.Event('done'), { result: result });
    });
});
@@ -516,30 +516,8 @@
 dex'
-,%0A        type: 'POST'
 %0A   
@@ -532,19 +532,10 @@
   //
- FIXME TODO
+//
  Ena
@@ -785,24 +785,1150 @@
 )%0A    //);%0A%0A
+    //if (window.location.hostname === 'blueimp.github.io') %7B%0A    //    // Demo settings:%0A    //    $('#fileupload').fileupload('option', %7B%0A    //        url: '//jquery-file-upload.appspot.com/',%0A    //        // Enable image resizing, except for Android and Opera,%0A    //        // which actually support image resizing, but fail to%0A    //        // send Blob objects via XHR requests:%0A    //        disableImageResize: /Android(?!.*Chrome)%7COpera/%0A    //            .test(window.navigator.userAgent),%0A    //        maxFileSize: 999000,%0A    //        acceptFileTypes: /(%5C.%7C%5C/)(gif%7Cjpe?g%7Cpng)$/i%0A    //    %7D);%0A    //    // Upload server status check for browsers with CORS support:%0A    //    if ($.support.cors) %7B%0A    //        $.ajax(%7B%0A    //            url: '//jquery-file-upload.appspot.com/',%0A    //            type: 'HEAD'%0A    //        %7D).fail(function () %7B%0A    //            $('%3Cdiv class=%22alert alert-danger%22/%3E')%0A    //                .text('Upload server currently unavailable - ' +%0A    //                        new Date())%0A    //                .appendTo('#fileupload');%0A    //        %7D);%0A    //    %7D%0A    //%7D else %7B%0A
     // Load 
@@ -2474,11 +2474,19 @@
     %7D);%0A
+    //%7D%0A
 %7D);

return removed parts of indexjs