Commit ed1f669f authored by Renán Sosa Guillen's avatar Renán Sosa Guillen

product img error

parent c5a3ec78
This diff is collapsed.
......@@ -39,13 +39,15 @@ def map(request):
#-------------------------------------------------------------------------------
def requestToImage(request):
# print("REQUEST: ", request.POST['value'])
img_link = request.POST['value']
# print("REQUEST: ", request.GET)
img_link = request.GET['value']
# img_link = img_link[:img_link.find("/") + 2] + "emmhp:geoemm29@" + img_link[img_link.find("/") + 2:]
r = requests.get(img_link, auth=("emmhp", "geoemm29"))
r = requests.get(img_link, auth=("emmhp", "geoemm29"), stream=True)
# print("RAAAW: ", r.raw.read())
return JsonResponse({'img': r.content})
# return JsonResponse({'img': "hello"})
return HttpResponse(r.raw.read(), content_type="image/jpeg")
#-------------------------------------------------------------------------------
def productList(request):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment