Wednesday, March 11, 2015
Python: A Picture
Problem: Could not serve image even when the data was correctly stored
Solution: Use the necessary headers in the response variable
The first step was to get the raw format of my image, over a thousand obscure and oddly spaced out characters. I modified a small client server in python, updating the path and host, to point to the minuscule image to access the raw data. Even when all the code was correctly saved to the local folder, I could not serve the image. After some failed 'fixes', such as modifying the file type of the image, the page served correctly when I added the correct headers to the response data.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment