Closed
Description
Deployment Type
Self-hosted
Triage priority
N/A
NetBox Version
v4.2.1
Python Version
3.12
Steps to Reproduce
After upgrading netbox 4.1.7 to 4.2.1 Netbox ignored django storage package for storing media files to S3.
Expected Behavior
Before upgrade all media files were succesfully stored in S3 and no modifications were done in that package or definments in extra.py file.
Observed Behavior
No errors in logs and all new media files are stored now in local storage instead of S3-bucket.
I believe that issue is related to django version upgrade to 5.1.
I found that Django 5.1 does not support DEFAULT_FILE_STORAGE parameter what is still in use in settings.py file.
if STORAGE_BACKEND is not None: DEFAULT_FILE_STORAGE = STORAGE_BACKEND # django-storages if STORAGE_BACKEND.startswith('storages.'):
https://forum.djangoproject.com/t/deprecation-of-default-file-storage-can-we-easen-the-migration/34284
Some discussion related to Django version 5.1 upgrade and backend storage parameters.