Image attachment not working after upgrade to 4.0.5 #16579
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Additional debugging info: <style> </style>AttributeError at /media/image-attachments/rack_45_IMG_20231111_140026471.jpg This FileResponse instance has no `content` attribute. Use `streaming_content` instead.
2024-06-20 05:29:17,689 django.request ERROR: Internal Server Error: /media/image-attachments/rack_45_IMG_20231111_132252001.jpg Traceback (most recent call last): File "/opt/netbox-4.0.5/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/opt/netbox-4.0.5/venv/lib/python3.10/site-packages/netbox_contextmenus/middleware.py", line 26, in __call__ content = str(response.content) File "/opt/netbox-4.0.5/venv/lib/python3.10/site-packages/django/http/response.py", line 458, in content raise AttributeError( AttributeError: This FileResponse instance has no `content` attribute. Use `streaming_content` instead. 2024-06-20 05:29:22,952 django.request ERROR: Internal Server Error: /media/image-attachments/rack_45_IMG_20231111_140026471.jpg Traceback (most recent call last): File "/opt/netbox-4.0.5/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/opt/netbox-4.0.5/venv/lib/python3.10/site-packages/netbox_contextmenus/middleware.py", line 26, in __call__ content = str(response.content) File "/opt/netbox-4.0.5/venv/lib/python3.10/site-packages/django/http/response.py", line 458, in content raise AttributeError( AttributeError: This FileResponse instance has no `content` attribute. Use `streaming_content` instead. |
Beta Was this translation helpful? Give feedback.
-
Does anyone know how to reapply the migration table as as content isnt changed to streaming content? |
Beta Was this translation helpful? Give feedback.
-
A bug had been filed for this. I'll see to get it fixed asap |
Beta Was this translation helpful? Give feedback.
That's not it. The error refers to a python object attribute (in python code), not any value in the database.
Furthermore, the error occurs here:
The error is occuring within a third-party package called
netbox_contextmenus
which appears to be broken (many plugins have not been updated to work with Netbox 4.0)Disable this plugin, and I suspect your problem will go away.