Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Postiz
  3. 413 Content Too Large on video upload (inner nginx client_max_body_size seems too low?)

413 Content Too Large on video upload (inner nginx client_max_body_size seems too low?)

Scheduled Pinned Locked Moved Postiz
2 Posts 2 Posters 6 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zigmasdirigeant
    wrote last edited by
    #1

    Hi folks 👋

    I’m running the Cloudron Postiz app and I’m blocked uploading videos because Postiz returns:

    413 Content Too Large on:
    POST /api/media/upload-server

    In the browser Network panel I see the response header server: nginx and the upload fails around ~5MB.

    I confirmed with an internal test that this is not Cloudron’s outer proxy, but the nginx inside the Postiz container:

    # created a 6MB file...
    dd if=/dev/zero of=/tmp/6mb.bin bs=1M count=6
    
    # called the Postiz nginx directly (inside the container)
    curl -sS -o /dev/null -w "%{http_code}\n" \
      -F "file=@/tmp/6mb.bin" \
      http://127.0.0.1:5000/api/media/upload-server
    # => 413
    

    The nginx vhost used by the container is:

    /etc/nginx/sites-enabled/postiz.conf

    and currently it contains no client_max_body_size directive (also confirmed via nginx -T | grep client_max_body_size → no output). Adding client_max_body_size would be the standard nginx fix (Postiz docs also suggest it for 413s).

    However, because this is a Cloudron app, I can’t apply persistent patches to the packaged nginx config within the container, right? (Am I missing something here?).

    Request/proposal:
    Could the Cloudron Postiz package include a higher client_max_body_size (or make it configurable), ideally scoped to the API location block?

    Example:

    location /api/ {
        client_max_body_size 200M;  # or 1G
        proxy_pass http://localhost:3000/;
        ...
    }
    

    Happy to test a package build or PR if you point me to the exact config template file used to generate /etc/nginx/sites-enabled/postiz.conf.

    Thanks! 😄

    1 Reply Last reply
    1
    • jamesJ Online
      jamesJ Online
      james
      Staff
      wrote last edited by
      #2

      Hello @zigmasdirigeant

      Thanks to your detailed report I was able to reproduce this issue right away.
      I will look into it.
      Either setting client_max_body_size 0; or make it configurable.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search