app/themes/default/public/scripts/edit.js
function (file, responseText) {
        console.log(responseText); // console should show the ID you pointed to
        // read the upload path from the elements data-upload attribute.
        var uploadPath = $(this.dropzone.element).data("upload") + responseText;
        var linkToUploadedFile = "(" + uploadPath + ")";
        if ( file.type.startsWith( "image/" ) ) {
            linkToUploadedFile = "![]" + linkToUploadedFile;
        } else {
            linkToUploadedFile = "[" + responseText + "]" + linkToUploadedFile;
        }
        this.simplemde.value(this.simplemde.value() + "\n" + linkToUploadedFile + "\n");
    }
function (file, responseText) {
        console.log(responseText); // console should show the ID you pointed to
        // read the upload path from the elements data-upload attribute.
        var uploadPath = $(this.dropzone.element).data("upload") + responseText;
        var linkToUploadedFile = "(" + uploadPath + ")";
        if ( file.type.startsWith( "image/" ) ) {
            linkToUploadedFile = "![]" + linkToUploadedFile;
        } else {
            linkToUploadedFile = "[" + responseText + "]" + linkToUploadedFile;
        }
        this.simplemde.value(this.simplemde.value() + "\n" + linkToUploadedFile + "\n");
    }
function ( file , responseText ) { console . log ( responseText ) ; // console should show the ID you pointed to // read the upload path from the elements data-upload attribute. var uploadPath = $ ( this . dropzone . element ) . data ( "upload" ) + responseText ; var linkToUploadedFile = "(" + uploadPath + ")" ; if ( file . type . startsWith ( "image/" ) ) { linkToUploadedFile = "![]" + linkToUploadedFile ; } else { linkToUploadedFile = "[" + responseText + "]" + linkToUploadedFile ; } this . simplemde . value ( this . simplemde . value ( ) + "\n" + linkToUploadedFile + "\n" ) ; }
Handle the event when the user successfully uploads a file via Dropzone
@prop file [string]
@prop responseText [string]
Handle the event when the user successfully uploads a file via Dropzone