Closed hontrang closed 7 years ago
@detail_route(methods=['GET']) def image(self, request, id=None, *args, **kwargs): snippets = Products.objects.get(id=id) ch = snippets['imageSource'].readchunk() return HttpResponse(ch, content_type="image/jpeg")