简体   繁体   中英

Dropzone does not click and does not work

My Dropzone does not click and does not work.

I already looked in other topics, but I didn't get the correct answer to my problem.

Here's my code:

<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename=dropzone_css) }}"/>
<script src="{{ url_for('static', filename=dropzone_js) }}"></script>

<div class="text-center">
    <div id="dropzone" class="m-3" style="max-width: 720px; display:none;">
        <form action="#" class="dropzone needsclick dz-clickable" id="demo-upload">
          <div class="dz-message needsclick">
            <button type="button" class="dz-button">
                <font style="vertical-align: inherit;">
                    <font style="vertical-align: inherit; font-size: large;">test, test, test,test, test</font>
                </font>
            </button>
          </div>
        </form>
    </div>
    <div class="conteudo_envia_zona m-4" style="display:none">
    </div>
</div>

what should I do?

it's necessary to make a dropzone instance in jquery:

$("#demo-upload").dropzone();

details at: https://www.dropzonejs.com/#create-dropzones-programmatically

First of all, it is not clear, why you set css property display:none of your dropzone div element:

<div id="dropzone" class="m-3" style="max-width: 720px; display:none;">

I used your code and it worked for me without any problems: Your Dropzone on my localhost

The only changes I made to set display:block property of the div element and binding the Dropzone JS and CSS files locally.

I believe your problem is, that Dropzone files are not loaded correctly. Please open the Developer Tools windows of your browser and check if there are some error on the "console" tab.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM