You will need to add the file:// protocol to $wgUrlProtocols.
https://www.mediawiki.org/wiki/Manual:$wgUrlProtocols#Modification_.28MW_1.…
(We should probably add this to FAQ if it's not already there, I've seen this
question asked a few times.)
--
Matma Rex