Excellent question. No, I hadn't.

I just added this:

    self.response.headers['Content-Type'] = 
str(mimetypes.guess_type(document.title)[0]) or 'application/octet-stream'

and the headers now say:

HTTP/1.1 200 OK
Cache-Control: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Content-Type: 
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Date: Wed, 20 Jul 2011 16:06:14 GMT
Server: Google Frontend
Content-Length: 10762

But there is no change.  .doc files still work, and .docx files do not.

Any other ideas?

-Joshua

On Jul 19, 2011, at 11:59 PM, Nick Johnson (Google) wrote:

> Have you checked what Mime-Type you're serving the documents as, and if it's 
> valid for docx documents?
> 
> -Nick Johnson
> 
> On Wed, Jul 20, 2011 at 9:55 AM, Joshua Smith <[email protected]> 
> wrote:
> If you look at this URL:
> 
> http://www.mytowngovernment.org/meeting/1234040
> 
> and click the link for one of the .doc files, they work in google's viewer.  
> But if you click on one of the .docx files, they don't.
> 
> When you click on the link to view, it does this:
> 
>   dlurl=re.sub('viewer','download',self.request.uri)
>   self.redirect("http://docs.google.com/viewer?url=%s"; % urllib.quote(dlurl))
> 
> and the download handler is simply:
> 
>   documentKey = self.request.get("document")
>   document = DocumentModel.get(documentKey)
>   self.send_blob(document.blob.key())
> 
> Everything I've read says that google's docs viewer should be able to view 
> .docx files, so I'm guessing the problem is in the way the blob is served 
> from GAE to Google Apps.
> 
> Any ideas?
> 
> -Joshua
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" 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/google-appengine?hl=en.
> 
> 
> 
> 
> -- 
> Nick Johnson, Developer Programs Engineer, App Engine
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" 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/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en.

Reply via email to