Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configure dropzone display area

Tags:

dropzone.js

I have successfully implemented dropzone.js on my ASP.MVC 4. But I need to shorten the height of the dropdown area and translate the texts. Is there any easy way to do so? I tried to modify the CSS with no results; the dropdown area still takes the same height.

like image 718
Matias Masso Avatar asked Aug 19 '14 07:08

Matias Masso


1 Answers

Finally got my own answer:

    <html>
<head >
    <meta name="viewport" content="width=device-width" />
    <title>Index2</title>
    <script src="/media/dropzone.js"></script>
    <link href="~/Media/css/basic.css" rel="stylesheet" />
    <link href="~/Media/css/dropzone.css" rel="stylesheet" />
</head>
<body>
    <style>
        .dropzone-previews {
            height: 200px;
            width: 500px;
            border: dashed 1px red;
            background-color: lightblue;
        }
    </style>

    <div id="previews" class="dropzone-previews"></div>
    <button id="clickable">Click me to select files</button>

    <script>
        new Dropzone("div#previews", { // Make the whole body a dropzone
            url: "/home/fileUpload", // Set the url
            previewsContainer: "#previews", // Define the container to display the previews
            clickable: "#clickable", // Define the element that should be used as click trigger to select files.
            maxFiles:5,
            acceptedFiles:"image/*,application/pdf"
        });
    </script>
</body>

like image 176
Matias Masso Avatar answered Oct 05 '22 06:10

Matias Masso