kandanapp / kandan

Kandan is an Open Source Alternative to HipChat
GNU Affero General Public License v3.0
2.72k stars 408 forks source link

Increase file upload size? #360

Closed johnjelinek closed 9 years ago

johnjelinek commented 10 years ago

I am getting 413 Request Entity Too Large for my 1MB file uploads. How can I increase the file upload size?

scouttyg commented 10 years ago

Try changing the values in attachments.js.coffee (in /app/assets/javascripts/backbone/plugins)

See:

  @initDropzone: ->
    $(".dropzone").filedrop({
      fallback_id: "file"
      paramname  : "file"
      maxfilesize: 1000
      queuefiles : 1
      ...
scouttyg commented 10 years ago

It also looks like it might be an nginx thing:

See: http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/

johnjelinek commented 10 years ago

I'll try both, thanks. On May 14, 2014 1:42 PM, "scouttyg" notifications@github.com wrote:

It also looks like it might be an nginx thing:

See: http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/

— Reply to this email directly or view it on GitHubhttps://github.com/kandanapp/kandan/issues/360#issuecomment-43120574 .

johnjelinek commented 10 years ago

@scouttyg The 413 was nginx, but when I upload files under the threshold, it still fails with a 500. In my case, I think this is still nginx's fault.

2014/05/14 21:25:17 [error] 9#0: *86 client intended to send too large body: 1413656 bytes, client: 10.9.4.52, server: , request: "POST /channels/1/attachments.json HTTP/1.1", host: "kandan:8080", referrer: "http://kandan:8080/"
2014/05/14 21:25:26 [crit] 9#0: *20 open() "/var/lib/nginx/body/0000000001" failed (13: Permission denied), client: 10.9.4.52, server: , request: "POST /channels/1/attachments.json HTTP/1.1", host: "kandan:8080", referrer: "http://kandan:8080/"
scouttyg commented 9 years ago

Hey John,

Reopen this if you are still having the issue, but if it was nginx, I'll close this for now.