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 :: promise with timeout js 
Javascript :: nested function javascript 
Javascript :: blob to text javascript 
Javascript :: How do I redirect to another webpage using javascript 
Javascript :: ** javascript Exponentiation 
Javascript :: javascript change content of h element 
Javascript :: Convertir Map a Json 
Javascript :: get url of website javascript 
Javascript :: get request with axios 
Javascript :: how to create onclick event on css class js 
Javascript :: loop node list 
Javascript :: check if radio button is selected jquery 
Javascript :: how to detect click outside div 
Javascript :: let var diferencia 
Javascript :: use $ instead of jQuery 
Javascript :: js concatenate regex 
Javascript :: javascript es6 class 
Javascript :: jquery api 
Javascript :: js operators 
Javascript :: clear all cookies 
Javascript :: js date to timestamp 
Javascript :: nodejs delete object key 
Javascript :: find duplicates and their count in an array javascript 
Javascript :: Redux thunk and react redux 
Javascript :: react useMemo to render a list 
Javascript :: is knex built into node js 
Javascript :: find the last occurrence of a character in a string javascript 
Javascript :: feet to cm javascript 
Javascript :: .foreach in javascript 
Javascript :: loop javascript 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =