1

i have following Code:

<form id="dvw-psa-enter-form" method="post" action="<?php echo site_url() . '/?upload' ?>" enctype="multipart/form-data">
 <div class="dropzone">
    <div class="fallback">
      <input name="file" type="file" multiple />
    </div>
  </div>
  <input type="submit" name="senden" />
</form>

<script src="<?php echo plugins_url() . '/dvelop-workflow-psa/dropzone.js' ?>"></script>
<script>
jQuery(".dropzone").dropzone({
  url: "<?php echo plugins_url() . '/upload' ?>",
  dictDefaultMessage: "Datei bitte hier ablegen!",
  success: function() {
    jQuery('.success-mark').show();
    jQuery('.error-mark').hide();
  },
  error: function() {
    jQuery('.success-mark').hide();
    jQuery('.error-mark').show();
  }
});
</script>

in my php file $_POST has some informations, but $_FILES is empty. success event fired: success-mark is visible, but no file in directory and $_FILES is empty. With the classic variant, everthing is fine.

php.ini Settings are correct.

Anyone has an idea?

bsand
  • 135
  • 1
  • 2
  • 8

1 Answers1

0

Try the url with a trailing space. When the url is a path it will automaticly redirect to /upload/, but empty the $_FILES array.

Michiel
  • 2,143
  • 1
  • 21
  • 21