django返回二进制图片

@login_required
def down_img(request, path):
    content = Storage().download(path)
    from django.http import StreamingHttpResponse
    # print(content,6666666666666)
    return HttpResponse(content, content_type='image/jpg')

猜你喜欢

转载自www.cnblogs.com/lajiao/p/9277260.html