12

I have a document authored in HTML with a TOC index page linking to numerous other pages, some having imgs etc. In other words, standard web content.

My work location uses Sharepoint exclusively for document exchange.

Is there a way to upload/import my HTML document into Sharepoint? It seems to only allow for upload single file document types like Word or Excel.

--

Thanks for the replies.

While there is a server, I only have access to it as sharepoint user. When I ask the corporate IT folks about load this document to a web server, they keep telling me to load to sharepoint. Attempts to explain further are met with blank stares by most, the single one that gets my need says she doesn't have a simple web server for me to use nor does she grog how to do it using sharepoint (SP is not her area of expertise).

The aspect of just uploading to sharepoint that I didn't make clear in the original that is not clear to me and that my local IT folks can't quite grasp is subdirectories. The layout of the web doc is roughly:

/
/index.html 
/page/
      /one.html
      /two.html
/images/
      /pic1.png
      /pic2.png

...and so forth.

Without re-authoring all links, can I put this into sharepoint?

Thanks again for any information.

3
  • 1
    I wonder does this belong on StackOverflow? Might be more help there for this kind of thing... maybe I'm wrong.
    – codeLes
    Sep 3, 2009 at 22:12
  • It could, but the answer is a bit of both. I am leaving it here unless others feels it needs to be moved. Sep 3, 2009 at 22:15
  • @codeLes it should be in the SharePoint community site.
    – Underverse
    Jan 8, 2018 at 1:24

5 Answers 5

6

You can upload your static HTML into any document library and it will work. Make sure you use relative URLs throughout to save yourself a lot of pain. CSS and images will display however you may have security issues with JavaScript.

Using SharePoint to store this information probably isn't the best idea unless you want to use its version control (or some other SharePoint-specific) functionality. Make sure there is a good business case or it will be much simpler to just host it as alpha1 has suggested.

1

You need to set your Browser file handling to "permissive"

1
  • 3
    I think this should read, "The SharePoint administrator (which OP is not) needs to change the server's default file handling to 'permissive'", which no admin in the history of corporate IT is ever going to do.
    – nudls00p
    Sep 30, 2020 at 9:17
1

I'm trying this out right now, in a similar situation. I have a Bootstrap-based site, designed and perfectly functional outside of SharePoint, and my task is to stand it up inside of SharePoint, since that's the only server available. I thought I'd have to redevelop the entire thing. But what I've done (so far, just in the testing stages) is use SharePoint's Site Content and Structure settings to replicate the directory structure of my site, and then I've uploaded my files and used the site settings to change the start page of the site from default.aspx to my index.html. And, in my scenario, and much to my surprise, it's working just fine.

To be fair, this particular site doesn't need any of SharePoint's functionality, other than access control. And there may be issues I haven't accounted for yet. But I was shocked to see that it actually worked.

This is a SharePoint Publishing site, BTW. Not sure how it would work (or if it would) in other types of SharePoint sites.

1
  • I haven't been able to work out how to "used the site settings to change the start page of the site from default.aspx to my index.html." What permissions are required to do this?
    – sjy
    Oct 29, 2020 at 4:06
0

"Without re-authoring all links, can I put this into sharepoint?"

No, sorry. You either need to redo your links to reflect the fact that your site's web root is a library in SharePoint, or you need to put that site elsewhere.

If you put the site elsewhere, you can use the Web Page Viewer webpart to display it in SharePoint.

Finally, which SharePoint Designer you can build files into the root of a site, but I wouldn't do that. I very much think all your documents (including HTML) should be in a library. You would still need to fix the links.

0

Have you tried just uploading to a document library and browsing the html file? I did this with a page created by exporting an Excel file with charts. On my local drive, the export process creates a .htm file and a folder with images referred by the html file. When I uploaded the .htm file (only), SharePoint took the subfolder with the images as well. Now, I'm not sure if that is because Excel created the .htm file as a multi-part file so SharePoint knew it also needed the subfolder, or if SharePoint actually parsed the html and knew it would need the subfolder, too. Once the file was on SharePoint, I am updating it via code on my local drive, then copying it through code to the SharePoint location. In this case, the code copy of the .htm file does NOT take the images with it, but I am able to copy the images to the folder in the SharePoint doc library using code. So, maybe that is a solution for you as well? Create a dummy MS Office doc with links that will force an html publish to create subfolder(s) with your required name(s), then upload it to SharePoint. Once there, overwrite the dummy stuff with your real files. Maybe, the MS Office publish will only create one subfolder, but you can probably change your real project around to use a single subfolder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .