I want to server an image file but accept some attributes for processing before hand using Python and google app engine.
Where I would normally have
'http://www.domain.com/image/desiredImage.jpg'
as the image to server.
I want to be able to add some tracking to it so I can do something similar to
'http://www.domain.com/image/desiredImage.jpg?ref_val=customerID'
I figured the best way to do this would be to have a "proxy" for image requests like
'http://www.domain.com/imageproxy?img=imgID&ref_val=customerID'
and have the imageproxy url process the ref_val value and serve the image based off the imgID value from the datastore db.Blob value.
When I access the proxy URL it shows the image and processes fine. When I used the URL in other 3rd party javascript JSON requests looking for an image url, I get nothing to show up.
I guess the root of my question is how is accessing
'http://www.domain.com/image.jpg'
different from accessing
'http://www.domain.com/script_that_returns_image'
where the latter URL is a python script that outputs
self.response.headers['Content-Type'] = 'image/jpeg'
self.response.out.write(image) #image a db.Blob property in google app engine