Increase Nginx upload limit to 100m, improve related docs [#5496].

By increasing the limit from 8m to 100m, we should immediately fix initial
problems for people trying to upload audio or video. From there, they can read
the documentation more closely when they try to upload larger files.
This commit is contained in:
Ben Sturmfels 2020-05-13 13:22:11 +10:00
parent 243354b65e
commit 5224d700dd
No known key found for this signature in database
GPG Key ID: 023C05E2C9C068F0
3 changed files with 26 additions and 16 deletions

View File

@ -408,8 +408,11 @@ should be modeled on the following::
# This is the section you should read
#####################################
# Change this to update the upload size limit for your users
client_max_body_size 8m;
# Change this to allow your users to upload larger files. If
# you enable audio or video you will need to increase this. This
# is essentially a security setting to prevent *extremely* large
# files being uploaded. Example settings include 500m and 1g.
client_max_body_size 100m;
# prevent attacks (someone uploading a .txt file that the browser
# interprets as an HTML file, etc.)

View File

@ -97,12 +97,6 @@ as whatever GStreamer plugins you want, good/bad/ugly):
# Fedora and co.
sudo dnf install gstreamer1-plugins-{base,bad-free,good,ugly-free}
.. note::
MediaGoblin previously generated spectrograms for uploaded audio. This
feature has been removed due to incompatibility with Python 3. We may
consider re-adding this feature in the future.
Add ``[[mediagoblin.media_types.audio]]`` under the ``[plugins]`` section in your
``mediagoblin.ini`` and update MediaGoblin::
@ -111,6 +105,20 @@ Add ``[[mediagoblin.media_types.audio]]`` under the ``[plugins]`` section in you
Restart MediaGoblin (and Celery if applicable). You should now be able to upload
and listen to audio files!
On production deployments, you will need to increase Nginx's
``client_max_body_size`` to allow larger files to be uploaded, or you'll get a
"413 Request Entity Too Large" error. See ":ref:`webserver-config`".
Production deployments will also need a separate process to transcode media in
the background. See ":ref:`systemd-service-files`" and
":ref:`separate-celery`" sections of this manual.
.. note::
MediaGoblin previously generated spectrograms for uploaded audio. This
feature has been removed due to incompatibility with Python 3. We may
consider re-adding this feature in the future.
Video
=====
@ -141,15 +149,13 @@ Run::
Restart MediaGoblin (and Celery if applicable). Now you should be able to submit
videos, and MediaGoblin should transcode them.
.. note::
On production deployments, you will need to increase Nginx's
``client_max_body_size`` to allow larger files to be uploaded, or you'll get a
"413 Request Entity Too Large" error. See ":ref:`webserver-config`".
You will likely need to increase the ``client_max_body_size`` setting in
Nginx to upload larger videos.
You almost certainly want to separate Celery from the normal
paste process or your users will probably find that their connections
time out as the video transcodes. To set that up, check out the
":doc:`production-deployments`" section of this manual.
Production deployments will also need a separate process to transcode media in
the background. To set that up, check out the ":doc:`deploying`" and
":doc:`production-deployments`" sections of this manual.
Raw image

View File

@ -106,6 +106,7 @@ system. Similar scripts will be in your system's ``/etc/init.d/``
or ``/etc/rc.d/`` directory, but the specifics of an init script will vary from
one distribution to the next.
.. _separate-celery:
Separate celery
---------------