Forum Discussion
Open HTML files in browser - SharePoint Online
MothraMoon I am having the same issue. I just migrated a library with an html page and it downloads rather than just opening in the browser. I have tried setting the "Open with" to client application and browser (which would be the client application anyways) and neither make a difference. I tried saving the file as .aspx but that did not work. My guess is the .htm and .html files are not defined in the search service. On SP2013, I was able to set that it in the Search Service Application under "File Types > Manage File Types". That option does not seem to exist in SPO.
amwreck Hope I am replying to the right place.
I think I have a break in the case. It's not perfect, and it is rather cumbersome and will be a ton of, but it works. It's better than hosting on the school's general website because I don't have access to it and I will always have to beg people to do things for me.
So, the thing I did was under "site pages" (on the left), clicked on that and opened a new "wiki." I name it, then over on the upper right I click "edit." The ribbon shows up and near the upper right I click "edit source." From there, I just cut and paste my old html source code into the window. You have to hit "OK" at the bottom, and then "Save" (upper left...or sometimes right).
This will create an aspx page which can be edited more like a word document (so the style sheet is no longer necessary). You can string the pages together by substituting the new full link to the new sharepoint page ending in aspx. (It seems to shorten them automatically to the root stem, but it works...such as https://nycda.sharepoint.com/sites/nydramalibrary/SitePages/BooleanExamples.aspx (where formely in my html site I just had to put BooleanExamples.html. Now it shortens it automatically to just https://nycda.sharepoint.com/sites/nydramalibrary/SitePages/BooleanExamples.aspx
Now for the photos. I dumped them into their own document library and submitted the long file path to those. Something like https://MYSCHOOL.sharepoint.com/sites/nydramalibrary/IL100%20Tutorials/booleanexamples.jpg (whereas in my old site all I had to put was booleanexamples.jpg).
This is the only workaround I have been able to devise and like I said, it will be kind of a BE-ATCH to do for 300 html files, but at least it seems doable.
- MothraMoonDec 05, 2019Copper Contributor
MothraMoon PS, and I should mention....if you go through all the effort to create the wiki pages, you need to remember to "Publish" them or the people in your organization who do not have administrative priviliges will not be able to see them. Since I created the site I could see them just fine, I only became aware of this when a student tried to click on the pages and they would not open.
- Kim RushbrookeJul 09, 2019Copper Contributor
MothraMoon Thanks for sharing your discovery. I have (in the short term) given up on this and am now exploring our dept website. However your solution looks intriguing so I'm gonna give it ago. I am no expert with Sharepoint but technically minded so happy to try anything. Thanks again for your tech.