My first question on StackOverflow . . .
In a Google App Engine application using python, I'm trying to display a small pdf image in-line with html on a page.
I have a small class, written like this:
class modelReport(db.Model):
    Applicant = db.StringProperty()
    Reportblob = db.BlobProperty()
A small form is used to Upload the image and Submit the image to the following handler:
class UploadResults(webapp.RequestHandler):
    def post(self):
        m = modelReport()
        m.Applicant = self.request.get("txtApplicantName")
        Reportblob = self.request.get("file")
        m.Reportblob = db.Blob(Reportblob)
        m.put()
I'm using the following code to display the image and the name of the Applicant:
class RetrieveResults(webapp.RequestHandler):
    def get(self):
        self.response.out.write('''
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="em">
        <head>
        <meta http-equiv="Content-Type" content="application/pdf" />
        <title>Results Page</title>
        </head>
        <body>
        ''')
        reports = db.GqlQuery('SELECT * FROM modelReport')
        for report in reports:
            self.response.out.write('</p><b>%s</b> report is:' % report.Applicant)
            self.response.out.write("<div><img src='img?img_id=%s'></img>" % report.key())
        self.response.out.write('''
        </body></html>
        ''')
When using the development server Datastore Viewer, I can see new 'modelReport' entities that list Key, Write Ops, ID, Key Name, Applicant, and Reportblob.
Issue is output lists the Applicant and then displays a small blue box with a "?" in the middle like it can't find the image file . . . And, the development server log console shows 404 errors:
INFO..."GET /retrieve_results/all_results HTTP/1.1" 200 -
INFO..."GET /retrieve_results/img?img_id=ag...Aww HTTP/1.1" 404 -
INFO..."GET /retrieve_results/img?img_id=ag...BQw HTTP/1.1" 404 -
INFO..."GET /retrieve_results/img?img_id=ag...Bgw HTTP/1.1" 404 -
I thought for awhile that I may be useing the wrong 'Content Type' header, but similar code using Apache web server displays the text and image just fine.
Seems like I may be making empty blobstore attributes "Reportblob", but I don't know how to verify or debug.
Any or all help fixing GAE code would be greatly appreciated.
 
     
    