1

I'm serving unversioned files via fossil's uv function. Now, this works fine for files without file extension and for archives. But I need to serve a .txt file. The problem now is that it gets delivered as a HTML page including the fossil web layout around it.

Is there a way to tell fossil to not do that, and instead deliver it as a raw .txt file?

Daniel Ziltener
  • 647
  • 1
  • 6
  • 21

1 Answers1

2

You can specify a mimetype parameter on the URL. For example, mimetype=application/octet-stream will cause it to be offered as download.

For example, instead of https://www.fossil-scm.org/index.html/uv/download.html, you’d put https://www.fossil-scm.org/index.html/uv/download.html?mimetype=application/octet-stream.

Fossil reacts to the following mimetypes by putting headers around them:

  • text/x-fossil-wiki
  • text/x-markdown
  • text/html
  • text/plain

Unfortunately, all other mimetypes appear to lead to the browser downloading the unversioned file instead of displaying it.

If that's a problem, you could try a mimetype of text with no suffix.

Otherwise, you can post on Fossil's support forum. Either as a question or as a feature request. :-)

Martijn
  • 13,225
  • 3
  • 48
  • 58