Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
ed1f669f
Commit
ed1f669f
authored
May 29, 2018
by
Renán Sosa Guillen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
product img error
parent
c5a3ec78
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
50 deletions
+98
-50
dataRetrieval.js
catalog/static/js/dataRetrieval.js
+92
-46
views.py
catalog/views.py
+6
-4
No files found.
catalog/static/js/dataRetrieval.js
View file @
ed1f669f
This diff is collapsed.
Click to expand it.
catalog/views.py
View file @
ed1f669f
...
@@ -39,13 +39,15 @@ def map(request):
...
@@ -39,13 +39,15 @@ def map(request):
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
def
requestToImage
(
request
):
def
requestToImage
(
request
):
# print("REQUEST: ", request.
POST['value']
)
# print("REQUEST: ", request.
GET
)
img_link
=
request
.
POS
T
[
'value'
]
img_link
=
request
.
GE
T
[
'value'
]
# img_link = img_link[:img_link.find("/") + 2] + "emmhp:geoemm29@" + img_link[img_link.find("/") + 2:]
# 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
):
def
productList
(
request
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment