Ron
Ron

Reputation: 23526

Dropzone.js - maxFilesize increase not working

I'm using Dropzone.js for my website. I'm in the need of uploading bigger files than the default maxFilesize of 500MB.

I tried to change the number in the .js file. Now the file seems to be accepted but there is no (visible?) progress in the upload. The file has no red cross and is stuck at zero percent of the upload.

Any ideas what I might be doing wrong? Or is this some kind of bug?

Upvotes: 13

Views: 73742

Answers (4)

Just for the record, because this post is from along time ago.

I solved it changing in the php.ini file parameter 'post_max_size' from my server. Maximum size of POST data that PHP will accept.

And then reboot the Apache Server.

Upvotes: 1

Julio Rosseti
Julio Rosseti

Reputation: 27

Add to httpd.conf file:

<Directory "/tmp/">
    LimitRequestBody 256000
</Directory>

After, restart apache!

Reference: https://www.cyberciti.biz/faq/apache-limiting-upload-size/

Upvotes: -2

Wlademyr Mendes
Wlademyr Mendes

Reputation: 129

The Dropzone.options must be out of document.ready or it wont work.

Upvotes: 4

enyo
enyo

Reputation: 16726

I just tested it in Chrome and it worked fine. (Which browser are you using?)

It might be that your upload is just taking so long that you don't see an update immediately.

First things first: you shouldn't change properties in the .js file itself. This way you wont be able to upgrade to a newer version of Dropzone without headaches. So configure your dropzone the way it's recommended on the website.

About the upload,... it's really hard to tell what might be wrong without a look at it. What I suggest, is that you add some kind of debugging information on the status updates, to see if it's really just your upload being very slow.

Try this code and see if it doesn't solve your problem:

<form id="my-dropzone" action="/target" class="dropzone"></form>

<script>
  Dropzone.options.myDropzone = {
    maxFilesize: 500,
    init: function() {
      this.on("uploadprogress", function(file, progress) {
        console.log("File progress", progress);
      });
    }
  }
</script>

If you can see the console output in regular intervals then the upload is working fine but just takes a while to finish.

Upvotes: 19

Related Questions