Datentypen Dropzone.options funktioniert nicht

XardasX

Mitglied
Hallo Java-Gemeinde,

ich habe ein für mich schwerliegendes Problem, und ich hoffe mal dass ich hier richtig bin.
Ich versuche Dropzone in meiner Testseite einzubinden. Das funktioniert auch alles.

Doch ich bekomme es nicht hin eine "Dropzone.options" einzubauen, wie zB folgende:

Java:
Dropzone.options.myDrop = {
  init: function() {
    this.on("complete", function() {
      if (this.getQueuedFiles().length == 0 && this.getUploadingFiles().length == 0) {
        // File finished uploading, and there aren't any left in the queue.
      }
    });
  }
};

Ich hab schon einige andere versucht, aber nichts funktioniert.
Meine komplette php-Seite sieht wie folgt aus:

PHP:
<html lang="en">
  <head>
    <meta charset="utf-8">
 
    <link rel="stylesheet" href="dropzone.css">
    <link rel="stylesheet" href="basic.css" /> 
    <script src="dropzone.js"></script> <!-- dropzone.js einbinden -->
 
    <title>Dropzone Demo</title>
  </head>
  <body>
<form id="my-dropzone" action="upload.php" class="dropzone"></form>

<script>
 Dropzone.options.myDrop = {
  init: function() {
    this.on("complete", function() {
      if (this.getQueuedFiles().length == 0 && this.getUploadingFiles().length == 0) {
        // File finished uploading, and there aren't any left in the queue.
      }
    });
  }
};
</script>
  </body>
</html>

Ich bin über alle Tipps oder Hilfe sehr dankbar.

Viele Grüße
XardasX
 
Du bist leider nicht richtig.
Deine frage betrifft javascript und nicht java, gehört daher in die kategorie "Andere Sprachen".

Des weiteren gibt es auf der seite Dropzone.js eine anleitung und usecases für dropzone.
 

Zurück
Oben