See: encode/django-rest-framework#7702
DRF does not currently have a way to authenticate file downloads or serve them efficiently through a reverse proxy such as NGINX.
Integrating django-downloadview with DRF is challenging because django-downloadview does not interact with DRF authentication middleware (e.g. REST_FRAMEWORK: 'DEFAULT_AUTHENTICATION_CLASSES'.
django-downloadview views cannot take advantage of 'rest_framework.authentication.BasicAuthentication' or (third-party) 'rest_framework_simplejwt.authentication.JWTAuthentication' authentication middleware. This results in the django-downloadview View being presented the AnonymousUser user, and thus being rejected.
See: encode/django-rest-framework#7702
DRF does not currently have a way to authenticate file downloads or serve them efficiently through a reverse proxy such as NGINX.
Integrating
django-downloadviewwith DRF is challenging becausedjango-downloadviewdoes not interact with DRF authentication middleware (e.g.REST_FRAMEWORK:'DEFAULT_AUTHENTICATION_CLASSES'.django-downloadviewviews cannot take advantage of'rest_framework.authentication.BasicAuthentication'or (third-party)'rest_framework_simplejwt.authentication.JWTAuthentication'authentication middleware. This results in thedjango-downloadviewViewbeing presented theAnonymousUseruser, and thus being rejected.