Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Online Doc Viewer

I have a file hosted on AWS Linux AMI. The link is http://54.179.188.146/a/a.docx I can visit the link and download the file.

I am trying to use Microsoft Online Doc Viewer to view the Word File online at this link https://view.officeapps.live.com/op/view.aspx?src=http://54.179.188.146/a/a.docx but it returns a page stating "An error occurred We're sorry, but for some reason we can't open this for you."

I had chmod the file to 775 but it still cannot view.

I had uploaded to another server and it is working. May I know what is wrong? Is it a server configuartion issue? Please advise.

Thanks.

like image 202
Derek Lim Avatar asked Dec 19 '22 13:12

Derek Lim


1 Answers

This is Old but giving some more pointers to the new visitors , i am posting the consolidated answer for the root cause of the "We’re sorry, but for some reason we can’t open this for you" error in https://view.officeapps.live.com/op/view.aspx?src=

If you see the error, "We’re sorry, but for some reason we can’t open this for you," it means the document could not be found or could not be displayed. Likely reasons include:

  • There’s no document to be found at the URL you provided. Make sure you provide the correct URL.
  • The document is too large. Word and PowerPoint documents must be less than 10 megabytes; Excel must be less than five megabytes.
  • The document was not saved in a format that is supported for opening in a web browser. Try saving your document in one of the following formats:
    • Word: docx, docm, dotm, dotx
    • Excel: xlsx, xlsb, xls, xlsm
    • PowerPoint: pptx, ppsx, ppt, pps, pptm, potm, ppam, potx, ppsm
  • You need to sign in or provide a password to open the document. Make the document publically available to view.
  • The document’s file name contains invalid characters. Try encoding the file name when you type the document’s URL, or rename the file to use only letters and numbers. For example, to encode a URL that includes an ampersand (i.e. &), you would type %26 for the ampersand character. For more information about URL encoding, also known as percent encoding.

more info can be found here

like image 200
King of Masses Avatar answered Dec 21 '22 01:12

King of Masses