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 197 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 on 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 on 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

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better ๐Ÿ’—

      Register Login
      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