Replies: 1 comment 1 reply
-
@GTorreil Just use the httpresponse ? from django.http import HttpResponse
def download_latest(request):
...
return HttpResponse(firmware.bin.read()) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there :)
I'm building an API that needs to distribute a firmware to update devices. I've set up an endpoint like so :
I've also created a renderer for this kind of response :
Now i'd like to use this renderer on the
download_latest
endpoint, but I want to keep using the JSON renderer for my other endpoints. I haven't found arenderer
argument on the view decorator, am I missing something ?How can I return an octet stream with this endpoint ?
Thanks a lot,
Beta Was this translation helpful? Give feedback.
All reactions