We have currently the problem that a lot of files stored in Subversion are missing the mime-type. Depending on the browser you are using, when surfing a Subversion directory and clicking on a link, you see the text e.g. of a PDF and not the PDF rendered in Acrobat Reader.
The obvious solution to this is to set the property in Subversion, in this example to set svn:mime-type to application/pdf and to set the relevant section in auto-props in the Subversion client configuration file. But a lot of our users don't understand that, and we don't control all their settings, so there will be added over and over again files to the repositories where the correct mime-type will be missing.
What are the options to correct this, and what are the drawbacks in using them?
If you use Apache HTTP Server to serve your Subversion repositories then you should configure default media types with help of mod_mime module. See docs at Apache Module mod_mime.
Generally speaking you need to add the following strings to Apache config and point TypesConfig to your mime.types file.
LoadModule mime_module bin/mod_mime.so
TypesConfig <path-to-mime.types-file>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With