[Mediawiki-l] Image name gets capitalized after upload

Brion Vibber brion at pobox.com
Fri May 20 23:36:26 UTC 2005


A Chan wrote:
> Hello,
>
> I'm running an older wiki using MediaWiki 1.1.

You should strongly consider upgrading to a current version (1.4.4 is
the current stable release). The 1.1 branch has not been maintained for
a long time, and may contain a number of exploitable security
vulnerabilities.

> I've uploaded a media file with a lower case name,
> e.g., "myfile".  But when viewing the image page, the
> file name is capitalized to "Myfile".  Is there anyway
> to preserve the case of the uploaded file?
>
> I am expecting readers to click on a media link
> [[Media:...]] to save the file locally, and I'd really
> like to preserve the lower case filename when do so.

Filenames of uploads are strongly tied to the wiki page system, and must
conform to the rules of page naming. Normally page titles are forced to
capitalize the initial letter, allowing links [[foo]] and [[Foo]] to
reference the same page.

You can disable this behavior for all page titles in current versions of
MediaWiki by setting $wgCapitalLinks = false; but this causes other
things to change: for instance all those [[foo]] links will no longer go
to the same page as [[Foo]] and it may require work to clean things up.
You cannot configure this separately for uploads and pages.

-- brion vibber (brion @ pobox.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20050520/16a45bff/attachment.pgp 


More information about the MediaWiki-l mailing list