Hi all, I know this should be simple but I can't find the answer anywhere, I
have some images in a database that I need to send to a webpage. So I have
a simple controller that should just send the binary data but I can't find
how to stuff binary data into the response object. here is my code
def photo(self, id):
sac = model.sac
q = sac.query
binaryImage = q(model.Students).get(id).photo
res = Response()
res.headers['Content-type'] = 'image/jpeg'
res.write(binaryImage)
return res
which displays nothing
Jose
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---