fix: increase lms profile image upload size limit to 2MB#303
fix: increase lms profile image upload size limit to 2MB#303
Conversation
There was a problem hiding this comment.
Pull request overview
This PR increases the LMS profile image upload size limit from 1MB to 2MB to resolve "Content too large" errors for image uploads slightly above 1MB. The change updates the EDXAPP_PROFILE_IMAGE_MAX_BYTES setting, which controls the NGINX endpoint-level upload limit for profile images.
Key Changes
- Updated
EDXAPP_PROFILE_IMAGE_MAX_BYTESfrom 1048576 (1MB) to 2097152 (2MB)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # In bytes | ||
| EDXAPP_PROFILE_IMAGE_MAX_BYTES: 1048576 | ||
| EDXAPP_PROFILE_IMAGE_MAX_BYTES: 2097152 |
There was a problem hiding this comment.
The EDXAPP_PROFILE_IMAGE_MAX_BYTES value has been updated to 2097152 (2MB) in this file, but the corresponding PROFILE_IMAGE_MAX_BYTES setting in docker/build/edxapp/lms.yml is still set to the old value of 1048576 (1MB). This inconsistency could cause profile image uploads to fail in Docker-based deployments while working in other environments. Consider updating docker/build/edxapp/lms.yml line 454 to match this change.
JIRA: https://2u-internal.atlassian.net/browse/DOS-6385
Image uploads were failing with “Content too large” errors for files slightly above 1MB.
Although global LMS and CMS NGINX upload limits are higher, the LMS NGINX configuration enforces a stricter, endpoint-level limit for profile image uploads via the EDXAPP_PROFILE_IMAGE_MAX_BYTES setting. This resulted in uploads being rejected before reaching the application.
This change increases EDXAPP_PROFILE_IMAGE_MAX_BYTES from 1MB to 2MB, allowing slightly larger image uploads while preserving the existing endpoint-level protection.