$(function () {
    'use strict';
    $('#fileupload')
        .fileupload({
            dataType: 'json',
            autoUpload: true,
            singleFileUploads: true,
            maxChunkSize: 10 * 1024 * 1024, // 10 MiB
            maxFileSize: 4 * 1024 * 1024 * 1024, // 4 GiB
        })

        .on('fileuploadadd', function (e, data) {
            data.context = $('<div class="alert alert-processing"/>')
                .appendTo('#files');

            // Generate human readable file size
            function humansize (size) {
                var suffix = ["B", "KiB", "MiB", "GiB", "TiB", "PiB"],
                    tier = 0;

                while (size >= 1024) {
                    size = size / 1024;
                    tier++;
                }

                return Math.round(size * 10) / 10 + " " + suffix[tier];
            }

            // Add one paragraph per file
            $.each(data.files, function (index, file) {
                var node = $('<p/>')
                    .text(file.name + " (" + humansize(file.size) + ")");
                node.appendTo(data.context);
            });
        })

        .on('fileuploadsubmit', function (e, data) {
            var $this = $(this);
            // Create new item
            $.ajax({
                type: 'POST',
                url: '/+upload/new',
                data: JSON.stringify({
                    filename: data.files[0].name,
                    size: data.files[0].size,
                    type: data.files[0].type,
                }),
                contentType: 'application/json',
                success: function (result) {
                    data.url = result.url;
                    $this.fileupload('send', data);
                }
            });
            return false;
        })

        .on('fileuploaddone', function (e, data) {
            $(data.context)
                .attr('class', 'alert alert-success')
            $.each(data.result.files, function (index, file) {
                $(data.context.children()[index])
                    .wrapInner($('<a target="_blank" class="alert-link">')
                        .prop('href', file.url));
            })
        })

        .on('fileuploadfail', function (e, data) {
            $(data.context)
                .attr('class', 'alert alert-danger')
                .append('<p><strong>Upload failed!</strong></p>');
        })

        .on('fileuploadprogressall', function (e, data) {
            var progress = parseInt(data.loaded / data.total * 100, 10);
            $('#fileupload-progress .progress-bar').css('width', progress + '%');
        })

        .on('fileuploadstart', function (e, data) {
            $('#fileupload-progress').css('visibility', 'visible');
        })

        .on('fileuploadstop', function (e, data) {
            $('#fileupload-progress').css('visibility', 'hidden');
        })

        .on('fileuploadprocessfail', function (e, data) {
            $(data.context)
                .attr('class', 'alert alert-danger');
            var index = data.index,
                file = data.files[index];
            $(data.context.children()[index])
                .append('<br>')
                .append('<strong>' + file.error + '</strong>');
        });
});

@@ -264,25 +264,24 @@
  1024 * 1024
-,
  // 4 GiB%0A  
@@ -1518,17 +1518,16 @@
 %5B0%5D.type
-,
 %0A       
@@ -1932,16 +1932,17 @@
 uccess')
+;
 %0A       
@@ -2576,17 +2576,25 @@
 progress
- 
+').find('
 .progres

resolve syntax issues that pycharm was complaining about