How can I increase file upload limit?

I tried various methods listed online.

Nothing works.

I have now reverted everything to normal. I have the most basic version of openedx installed yesterday using tutor. and the official documentation.
Whenever i try to upload my 800mb video in the files section, it says adding a file and then does nothing.

Please help, this is urgent

Hi @Dhairya_Kapadia and welcome to the community :slight_smile:

There are currently 3 locations that govern the file upload limit, at the moment they’re quite severely disjointed from each other but there is already awareness of the issue, this will improve in future but it’s been a lot of work for the maintainers to develop all the MFE’s so not everything is quite 100% yet.

One setting lives in the edx-platform repo, this is the original setting that historically controlled the value - Tutor does have an implementation of this setting which can be patched with a openedx-cms-common-settings patch.

There’s also a hardcoded value in the frontend-app-authoring MFE which has to be manually modified in a fork of the repo.

Lastly there’s a Caddyfile setting to allow the maximum file size through the Caddy proxy.

As an illustrative example you might change the setting like this:

  1. Create a fork of the Authoring MFE, edit the value in constants.js and add it to your installation with a plugin like this:
from tutormfe.hooks import MFE_APPS

@MFE_APPS.add()
def _override_authoring_mfe(mfes):
    mfes["authoring"] = {
        "repository": "https://github.com/YourUsername/frontend-app-authoring.git",
        "version": "YourBranchName", 
        "port": 2001, 
    }
    return mfes
  1. Patch the Caddyfile and CMS settings something like this (replace 1024 for the value in MB that you want, but that should give you some leeway for your 800MB file and a little more)
from tutor import hooks

hooks.Filters.ENV_PATCHES.add_item(
    (
        "openedx-cms-production-settings",
        "MAX_ASSET_UPLOAD_FILE_SIZE_IN_MB = 1024"
    )
)

hooks.Filters.ENV_PATCHES.add_item(
    (
        "caddyfile-cms",
        """
# Maximum asset upload size in CMS/Studio
handle /assets/* {
    request_body {
        max_size 1024MB
    }
}
        """
    )
)
  1. enable the plugins above and rebuild your MFE with tutor images build mfe and then stop/start your instance with tutor local stop && tutor local start -d

If all went according to plan then you should be able to upload larger files now, hope this helps :slight_smile:

2 Likes

@joel.edwards I am struggling with a similar problem. I am tried and failed to increase the upload limit in SGA from 4 MB to 25 MB. I am using Tutor 20.0.1 version in production and Tutor 20.0.0 in test. Would you kind in helping me how to increase limit. I have read different versions of the solution and not sure which one is valid for me. I could not find frontend-app-authoring in my install. I one MFE container and not multiple. I can see there is Caddy limit of 4 MB but if i add the plugin as below from tutor import hooks

===================================================

Increase Caddy upload size for LMS only (25 MB)

===================================================

hooks.Filters.ENV_PATCHES.add_item(
(
“caddyfile-lms”,
“”"

Added by upload_limit plugin

route {
request_body {
max_size 25MB
}
}
“”"
)
)

It just adds another block instead of changing the block where it mentions 4 MB.

Secondly MAX_ASSET_UPLOAD_FILE_SIZE_IN_MB is already 100 MB so I feel no change required there. I have also heard of STUDENT_FILEUPLOAD_MAX_SIZE . which settings need to be updated? Would it be openedx-lms-common-settings?

Finally the frontend-app-authoring is it valid for Tutor 20.0.1 or 20.0.0? If you could clarify please?

Hi @nevilleonline
Regret I’m unfamiliar with the SGA stuff so my knowledge is a bit limited there.

Looking at the CaddyFile and based on the position of the patch directive I don’t think you’re easily going to change that specific value via a patch, you could try manually modifying the value in ~/.local/share/tutor/env/apps/caddy/Caddyfile but beware if you run tutor config save then this change will be overwritten, but it may be enough to try modify the value, restart the Caddy container and see if that allows your larger files through. We might need to see what URI/URL the SGA uses as it’s endpoint and create a new block specific to that endpoint so we don’t duplicate the same block (similar in a way to how I demonstrated the caddyfile-cms in my previous post where we use handle /assets/* to create a block specific to Studio Files uploads)

I expect that STUDENT_FILEUPLOAD_MAX_SIZE should also be updated for which you can use a openedx-lms-common-settings patch but note here that the value is written in bytes as 4 * 1000 * 1000 # 4 MB so try match that formatting as well.

That’s correct, there is one MFE container which can contain multiple MFE’s, frontend-app-authoring included, see here

MFE’s were first introduced somewhere around v13 of Tutor, it’s valid for all current versions of Tutor, just be mindful that it is an area with a lot of active development so reporting of bugs/broken/missing features is always welcome :slight_smile:

Hi @joel.edwards thank you for your valuable response. I have got this log while uploading a file below

tutor local logs --tail=10 -f

lms-1 | 2025-11-17 13:32:14,592 INFO 39 [tracking] [user 18] [ip 10.0.0.7] logger.py:41 - {“name”: “/courses/course-v1:mydomain+SMI+ACIS-SMI-1025-15Nov2025/instructor/api/list_instructor_tasks”, “context”: {“course_id”: “course-v1:mydomain+SMI+ACIS-SMI-1025-15Nov2025”, “course_user_tags”: {}, “user_id”: 18, “path”: “/courses/course-v1:mydomain+SMI+ACIS-SMI-1025-15Nov2025/instructor/api/list_instructor_tasks”, “org_id”: “mydomain”, “enterprise_uuid”: “”}, “username”: “ben_lithan_com”, “session”: “1b2a9af061a1e1d5c90285728f3c972d”, “ip”: “10.0.0.7”, “agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0”, “host”: “mydomain.domain.com”, “referer”: “https://mydomain.domain.com/courses/course-v1:mydomain+SMI+ACIS-SMI-1025-15Nov2025/instructor”, “accept_language”: “en-US,en;q=0.5”, “event”: “{“GET”: {}, “POST”: {}}”, “time”: “2025-11-17T13:32:14.592730+00:00”, “event_type”: “/courses/course-v1:mydomain+SMI+ACIS-SMI-1025-15Nov2025/instructor/api/list_instructor_tasks”, “event_source”: “server”, “page”: null}
lms-1 | [pid: 39|app: 0|req: 18151/40883] 172.18.0.4 () {60 vars in 1529 bytes} [Mon Nov 17 13:32:14 2025] POST /courses/course-v1:mydomain+SMI+ACIS-SMI-1025-15Nov2025/instructor/api/list_instructor_tasks => generated 17 bytes in 75 msecs (HTTP/1.1 200) 12 headers in 665 bytes (1 switches on core 0)
caddy-1 | {“level”:“info”,“ts”:1763386334.6555169,“logger”:“http.log.access.log0”,“msg”:“handled request”,“request”:{“remote_ip”:“10.0.0.7”,“remote_port”:“50715”,“client_ip”:“10.0.0.7”,“proto”:“HTTP/3.0”,“method”:“POST”,“host”:“mydomain.domain.com”,“uri”:“/courses/course-v1:mydomain+SMI+ACIS-SMI-1025-15Nov2025/instructor/api/list_instructor_tasks”,“tls”:{“resumed”:true,“version”:772,“cipher_suite”:4865,“proto”:“h3”,“server_name”:“mydomain.domain.com”}},“bytes_read”:0,“user_id”:“”,“duration”:0.07656228,“size”:17,“status”:200}
lms-1 | 2025-11-17 13:32:15,400 INFO 38 [tracking] [user 5] [ip 10.0.0.5] logger.py:41 - {“name”: “/courses/course-v1:OpenedX+DemoX+DemoCourse/xblock/block-v1:OpenedX+DemoX+DemoCourse+type@edx_sga+block@7a86a1b843394bf8871ae103dc3c4edb/handler/upload_assignment”, “context”: {“course_id”: “course-v1:OpenedX+DemoX+DemoCourse”, “course_user_tags”: {}, “user_id”: 5, “path”: “/courses/course-v1:OpenedX+DemoX+DemoCourse/xblock/block-v1:OpenedX+DemoX+DemoCourse+type@edx_sga+block@7a86a1b843394bf8871ae103dc3c4edb/handler/upload_assignment”, “org_id”: “OpenedX”, “enterprise_uuid”: “”}, “username”: “Neville_mydomain”, “session”: “54a5d7391a570893286aadfe1e3d0ba4”, “ip”: “10.0.0.5”, “agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36”, “host”: “mydomain.domain.com”, “referer”: “https://mydomain.domain.com/xblock/block-v1:OpenedX+DemoX+DemoCourse+type@vertical+block@78b75020d3894fdfa8b4994f97275294?exam_access=&jumpToId&preview=0&recheck_access=1&show_bookmark=0&show_title=0&view=student_view”, “accept_language”: “en-US,en;q=0.9”, “event”: “{“GET”: {}, “POST”: {}}”, “time”: “2025-11-17T13:32:15.400054+00:00”, “event_type”: “/courses/course-v1:OpenedX+DemoX+DemoCourse/xblock/block-v1:OpenedX+DemoX+DemoCourse+type@edx_sga+block@7a86a1b843394bf8871ae103dc3c4edb/handler/upload_assignment”, “event_source”: “server”, “page”: null}
lms-1 | 2025-11-17 13:32:15,503 INFO 38 [submissions.api] [user 5] [ip 10.0.0.5] api.py:989 - Created submission uuid=390ffc41-3dba-4ba3-8290-c5fba60ffee4 for (course_id=course-v1:OpenedX+DemoX+DemoCourse, item_id=block-v1:OpenedX+DemoX+DemoCourse+type@edx_sga+block@7a86a1b843394bf8871ae103dc3c4edb, anonymous_student_id=9e0fbc63bc9e736fde69a11ab8fe785e)
lms-1 | 2025-11-17 13:32:15,503 INFO 38 [edx_sga.sga] [user 5] [ip 10.0.0.5] sga.py:284 - Saving file: Form15G.pdf at path: OpenedX/DemoX/edx_sga/7a86a1b843394bf8871ae103dc3c4edb/d432c47528b45dd4cbd82c869b620168661d4423.pdf for user: Neville_mydomain
lms-1 | [pid: 38|app: 0|req: 18365/40884] 172.18.0.4 () {68 vars in 3860 bytes} [Mon Nov 17 13:32:15 2025] POST /courses/course-v1:OpenedX+DemoX+DemoCourse/xblock/block-v1:OpenedX+DemoX+DemoCourse+type@edx_sga+block@7a86a1b843394bf8871ae103dc3c4edb/handler/upload_assignment => generated 231 bytes in 419 msecs (HTTP/1.1 200) 8 headers in 390 bytes (24 switches on core 0)
caddy-1 | {“level”:“info”,“ts”:1763386335.5255284,“logger”:“http.log.access.log0”,“msg”:“handled request”,“request”:{“remote_ip”:“10.0.0.5”,“remote_port”:“64362”,“client_ip”:“10.0.0.5”,“proto”:“HTTP/3.0”,“method”:“POST”,“host”:“mydomain.domain.com”,“uri”:“/courses/course-v1:OpenedX+DemoX+DemoCourse/xblock/block-v1:OpenedX+DemoX+DemoCourse+type@edx_sga+block@7a86a1b843394bf8871ae103dc3c4edb/handler/upload_assignment”,“tls”:{“resumed”:true,“version”:772,“cipher_suite”:4865,“proto”:“h3”,“server_name”:“mydomain.domain.com”}},“bytes_read”:156616,“user_id”:“”,“duration”:0.420915229,“size”:231,“status”:200}

Not sure if it makes sense to you. what would be the path to add below?

I have got the below plugin that works (correctly adds and doesn’t replace the blocks) but not sure about the path/URI/URL to give in Caddy file. Does the log give you any clues?

from tutor import hooks

============================================================

1. LMS Python settings for ORA2 (SGA) upload limit

============================================================

hooks.Filters.ENV_PATCHES.add_item((
“openedx-lms-common-settings”,
“”"

SGA / ORA2 upload limit

STUDENT_FILEUPLOAD_MAX_SIZE = 25 * 1000 * 1000

"""

))

============================================================

2. Caddy upload limit (reverse proxy)

============================================================

hooks.Filters.ENV_PATCHES.add_item((
“caddyfile-lms”,
“”"

Increase SGA upload size for Staff Graded Assignment

handle /* {
request_body {
max_size 25MB
}
}
“”"
))

Also about frontend-app-authoring you agree its valid for my install as well and I need to do it to complete my solution.

Hi @nevilleonline

For full disclosure, I have not tested this, it’s a best-effort guess on my part having never used the SGA features. But this might help to patch your CaddyFile, based on the URI being like this: /courses/course-v1:OpenedX+DemoX+DemoCourse/xblock/block-v1:OpenedX+DemoX+DemoCourse+type@edx_sga+block@7a86a1b843394bf8871ae103dc3c4edb/handler/upload_assignment

from tutor import hooks

# Patch LMS Caddy config to allow larger SGA assignment uploads
hooks.Filters.ENV_PATCHES.add_item(
    (
        "caddyfile-lms",
        """
# Maximum file upload size for SGA assignment submissions
handle_path /courses/*/xblock/*/handler/upload_assignment* {
    request_body {
        max_size 25MB
    }
}
        """
    )
)

Insofar as I’m aware, current Tutor builds are heavily dependant on the MFE’s and it’s not officially supported to use Tutor without MFE.

As a side-note, when submitting logs or code snippets, please use the Preformatted Text option in the message editor (you can also highlight the text you paste and press CTRL+E to transform it into a code block) as this makes it much easier to read what you have put up.