put = $('.note-image-input');
        imageInput.fileupload();
        var jqXHR = imageInput.fileupload('send', 
            {
                files: files,
                formData: {csrfmiddlewaretoken: csrftoken},
                url: '{{ url.upload_attachment }}',
            })
            .success(function (result, textStatus, jqXHR) {
                data = $.parseJSON(result);
                $.each(data.files, function (index, file) {
                    editor.insertImage(position, file.url);
   