Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In the SharePoint 2013 environment that I'm developing, I'd like users to be able to view HTML files from a list. I'm able to a HTML file to the Document Library that I've created, but clicking them only gives the user the option to save the file to the local disk, not to open it. Unlike .txt or .doc files, which can be viewed directly in the browser.

Is there a way to be get the user to view the HTML page in the browser upon clicking it in the list?

Thanks in advance!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Follow the instructions that Anders Rask answered here :How can I force SharePoint 2010 to open PDF's in the browser?

but replace

"application/pdf"

with

"text/html"

Like so:

$webapp = Get-SPWebApplication <your webapp url> 
$webapp.AllowedInlineDownloadedMimeTypes.Add("text/html")
$webapp.Update()
share|improve this answer
    
My thanks, Robert. I was going to test PDF files next, but now that's taken care of as well. :D –  David May 8 '13 at 9:30
    
No problem! Thank Anders –  Robert Lindgren May 8 '13 at 9:34

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.