Displaying Uploaded File In Gae Appengine With Python
I have stored pdf files uploaded by users in the Datastore, as BlobProperties:
Solution 2:
The most basic way that this appears to be wrong is that:
<embedsrc="{{ person.pdf }}">
should contain the URL to download the pdf file. However, person.pdf actually contains the file data.
You'll need one handler to serve the html with the URL to the pdf data, and a separate handler to return the pdf data.
Solution 3:
I finally solved it by simply doing:
self.response.write(person.pdf)
in the display handler. D'oh.
Post a Comment for "Displaying Uploaded File In Gae Appengine With Python"