Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to halt image uploading in Dropbox.js

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 285
    Comment on it

    If you are using Dropbox.js for file uploading and wants to upload some specific extension type like csv, xls etc. Please follow the below code::

    Dropzone.options.uploadcontact = { maxFilesize: 10, // Mb acceptedFiles: ".xls,.xlsx,.csv", // accepted file type maxFiles: 1, init: function () {
    // Set up any event handlers this.on('complete', function (file,done) { if (this.getUploadingFiles().length === 0 && this.getQueuedFiles().length === 0) { if (this.files[1]!=null){ this.removeFile(this.files[0]); } if (this.getRejectedFiles().length === 1) { //alert("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); }else{ window.location.href = "list-uploaded-contact"; // form action }
    } }); } };

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: