Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

dropzone add download button

myDropzone.on("success", function(file) {
    var a = document.createElement('a');
    a.setAttribute('href',"/uploads/" + file.fullname);
    a.innerHTML = "<br>download";
    file.previewTemplate.appendChild(a);
});
Comment

dropzone add download button addedfile

    //Prepare the drop zone area
var myNewdDropzone = new Dropzone("#idOfForm",  {
    url: "my-ajax.php",
    method: "POST",
    addRemoveLinks: false,
    clickable: true,
    previewTemplate: document.querySelector('#preview-template').innerHTML,
    init : function() {
        this.on("addedfile", function(file) { new_file_added(file); });
        this.on("thumbnail", function(file,fileurl) { new_thumbnail_added(file); });
        this.on("removedfile", function(file) { new_file_removed(file); });
        this.on("totaluploadprogress", function(progress) { display_progress(progress); });
        this.on("queuecomplete", function() { all_files_uploaded(); });
        //this.on("processing", function(file) { new_file_processed(file); });
    }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: react check if focused 
Javascript :: pangram javascript 
Javascript :: javascript redirect to url 
Javascript :: js redirect page 
Javascript :: redirect react js 
Javascript :: javascript redirect example 
Javascript :: redirect to another domain javascript 
Javascript :: javascript addeventlistener to class 
Javascript :: select first 3 letters js 
Javascript :: javascript MAX INT and MIN INT 
Javascript :: Javascript looping through table 
Javascript :: regex detect negative numbers 
Javascript :: multiple connections to mongoose 
Javascript :: set delay javascript 
Javascript :: jquery get selected text from multiselect 
Javascript :: delete item from list javascript 
Javascript :: display am pm in javascript 
Javascript :: new line in js 
Javascript :: angular filter array of objects 
Javascript :: react native class component constructor 
Javascript :: js create element from string 
Javascript :: javascript explode 
Javascript :: write json file nodejs 
Javascript :: string to ascii javascript 
Javascript :: javascript decimal to string 
Javascript :: javascript confirm delete 
Javascript :: vuex-module-decorators access other state 
Javascript :: js sort ascendign 
Javascript :: rgb to hex js 
Javascript :: java scipt 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =