File Hosting & Sharing

Document Hosting

Definition

Document hosting covers the file types people work in rather than read in a tab. A Word file, a spreadsheet or a deck reaches a browser and has nowhere to go: there is no built-in renderer for any of them, so the only sensible outcome is a saved file that opens in the application it was made for. That puts all the weight on two response headers and on the name the file arrives with. Each format has its own long MIME type — a .docx is application/vnd.openxmlformats-officedocument.wordprocessingml.document, an .xlsx ends in spreadsheetml.sheet — and getting one wrong is the usual reason a download opens as nonsense. This is the opposite situation from PDF hosting, where the whole point is that the browser can display the file.

Why It Matters

A download that arrives as 'download (3)' or, worse, as an unnamed .zip is a small disaster: the recipient cannot tell what it is, the association with Word is lost, and double-clicking it does nothing useful. Named correctly, the same bytes land as Q3-board-pack.docx and open on the first attempt. Filenames also survive into the recipient's own filing, so a vague one propagates through their team for months. The other thing worth deciding early is whether the reader needs to edit at all — if not, exporting to PDF removes every one of these problems, since the document then simply opens in the tab.

How It Works

The host sends the format's own Content-Type together with Content-Disposition: attachment and a filename parameter, which is what the browser writes to disk. Non-ASCII names need the filename*=UTF-8'' form alongside the plain one, or accented characters come through mangled. A detail that catches out home-made setups: the OOXML formats are themselves ZIP containers full of XML, so a server that sniffs content rather than trusting the file extension will label a .docx as application/zip and the download arrives as an archive. Range requests and caching work as they do for any other object, since nothing here is parsed or transformed — the web server hands over the stored bytes exactly as they were uploaded, which is also why formatting, fonts and macros survive the trip intact.

Real-World Example

A firm publishes its standard terms as a 900 KB .docx at northgate-terms.99helpers.site so clients can mark it up. 99helpers serves it with the Word media type and a Content-Disposition naming the file, so it saves as northgate-terms.docx and opens in Word with track changes ready. The firm hosts the signed version as a PDF beside it, because that one is meant to be read rather than edited, and nobody needs to download anything to look at it.

Common Mistakes

  • Letting a server guess the type of a .docx or .xlsx — it sees the ZIP container inside and labels it application/zip, so the download opens as an archive of XML
  • Publishing a document for people who only need to read it, when a PDF export would open in the browser and skip the download entirely
  • Shipping a file whose name means nothing outside your own folder structure, such as final-v4-NEW.docx, which the recipient then keeps forever
  • Forgetting that a shared document carries its history with it — tracked changes, comments and author names travel inside the file

Related Terms

Put a file online in seconds

Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.

Host a file free →