-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
Hi all,
im using python as backend calling ISILON API and i want display an image on the front-end webpage with Svelte NodeJS.
I have this function in the backend where the requested filename could be JPG, PNG or TIF file.
Is this the correct way to get an image or maybe the head should contain the 'Content-Type' : 'image/octet-stream' ?
Is the returned image a buffer of bytes?
What is the best way to use the output of this API ?
def getFileTextOperation(request, Response, api):
currentpath = request.args.get("dir", default="")
filename = request.args.get("filename", default="")
if filename is None: #basic checks on provided input
return Response("filename must be provided", status=400)
if currentpath is None: #basic checks on provided input
return Response("currentpath must be provided", status=400)
head = {
'x-isi-ifs-target-type': "object"
}
data = api.session.api_call("GET","/namespace/ifs/data/"+currentpath+"/"+filename, headers = head)
return data
Thanks in advance,
Alfredo.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels