Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I am using Google docs viewer to display files online in my web application. I have problem with images and some other extensions. According to Google, I can open images with viewer. However, it fails for me.

For example, I am trying to open this image with docs viewer but it gives an error message.

Sorry, this type of document is not supported for viewing.
You can also try to download the original document by clicking here.
share|improve this question
add comment

1 Answer 1

When clicking the link to the image you mentioned (http://imgs.mi9.com/uploads/3d/16/3d-human-figure_1920x1200_233.jpg) , the browser is actually redirected to an HTML page containing the image (http://mi9.com/wallpaper/3d-human-figure_233/). When copying and pasting the image URL into a new browser window, only the image is displayed (no redirection).

The owners of mi9.com has probably done to prevent hot-linking: If someone embeds the image on their own website, while the image is stored elsewhere, it is essentially bandwidth theft. It is not uncommon to use this technique, which is based on the Referer header sent by the browser. The technique is described in detail here.

This would explain why Google Docs cannot view it - its request to fetch the image is redirected to the HTML page, which Google Docs does not know how to handle.

share|improve this answer
    
Thank you. no direction is happening for me. It opens the image. It was also just an example. My problem is valid for all images unfortunately. –  nevayeshirazi Feb 21 '13 at 12:05
    
nasa.gov/images/content/707855main_20121120_135424_d7c2A.jpg not working as well for example. –  nevayeshirazi Feb 21 '13 at 12:06
1  
Hmm, you're right, I can't seem to find any JPG image it will display. Seems like a bug to me - you might want to report that to Google. If you do, don't use the example you first posted - or they might tell you the whole story of hotlinking and redirection that I posted. –  Vidar S. Ramdal Feb 21 '13 at 12:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.