mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-21 20:18:38 -06:00
Fix image path construction
This commit is contained in:
@@ -211,7 +211,7 @@ class ImageAttachmentViewSet(NetBoxModelViewSet):
|
||||
def download(self, request, pk, *args, **kwargs):
|
||||
obj = get_object_or_404(self.queryset, pk=pk)
|
||||
# Render and return the elevation as an SVG drawing with the correct content type
|
||||
return serve(request, obj.image.path, document_root=settings.MEDIA_ROOT)
|
||||
return serve(request, obj.image.name, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user