HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /var/www/html/pmw24/driver_settlement/old/public/admin_assets/js/dropzone.js
/*=========================================================================================
    File Name: dropzone.js
    Description: dropzone
    --------------------------------------------------------------------------------------
    Item Name: Robust - Responsive Admin Theme
    Version: 1.2
    Author: PIXINVENT
    Author URL: http://www.themeforest.net/user/pixinvent
==========================================================================================*/
(function(window, document, $) {
    'use strict';
    Dropzone.options.dpzSingleFile = {
        paramName: "file", // The name that will be used to transfer the file
        maxFiles: 1,
        init: function() {
            this.on("maxfilesexceeded", function(file) {
                this.removeAllFiles();
                this.addFile(file);
            });
        }
    };

    /********************************************
    *               Multiple Files              *
    ********************************************/
    Dropzone.options.dpzMultipleFiles = {
        paramName: "file", // The name that will be used to transfer the file
        maxFilesize: 0.5, // MB
        clickable: true
    }


    /********************************************************
    *               Use Button To Select Files              *
    ********************************************************/
    new Dropzone(document.body, { // Make the whole body a dropzone
        url: "#", // Set the url
        previewsContainer: "#dpz-btn-select-files", // Define the container to display the previews
        clickable: "#select-files" // Define the element that should be used as click trigger to select files.
    });


    /****************************************************************
    *               Limit File Size and No. Of Files                *
    ****************************************************************/
    Dropzone.options.dpzFileLimits = {
        paramName: "file", // The name that will be used to transfer the file
        maxFilesize: 0.5, // MB
        maxFiles: 5,
        maxThumbnailFilesize: 1, // MB
    }


    /********************************************
    *               Accepted Files              *
    ********************************************/
    Dropzone.options.dpAcceptFiles = {
        paramName: "file", // The name that will be used to transfer the file
        maxFilesize: 1, // MB
        acceptedFiles: 'image/*'
    }


    /************************************************
    *               Remove Thumbnail                *
    ************************************************/
    Dropzone.options.dpzRemoveThumb = {
        paramName: "file", // The name that will be used to transfer the file
        maxFilesize: 1, // MB
        addRemoveLinks: true,
        dictRemoveFile: " Trash"
    }

    /*****************************************************
    *               Remove All Thumbnails                *
    *****************************************************/
    Dropzone.options.dpzRemoveAllThumb = {
        paramName: "file", // The name that will be used to transfer the file
        maxFilesize: 1, // MB
        init: function() {

            // Using a closure.
            var _this = this;

            // Setup the observer for the button.
            $("#clear-dropzone").on("click", function() {
                // Using "_this" here, because "this" doesn't point to the dropzone anymore
                _this.removeAllFiles();
                // If you want to cancel uploads as well, you
                // could also call _this.removeAllFiles(true);
            });
        }
    }
})(window, document, jQuery);