I suspect this auto-extension voodoo has been added to MW recently. — jayvdb, IRC
Extension is considered to have a form of period and some alphanumeric characters. Each name within File: namespace should end with an extension corresponding to its file metadata type. It's possible to create a filepage with any number of pseudo extentions ([[ https://test.wikipedia.org/wiki/File:MP_sounds.firstext.secondext.png | File:MP_sounds.firstext.secondext.png ]]).
When trying to upload a file with API (I use script/upload.py):
# If filename ends with a period (.), it raises APIError: filetype-missing: The file is missing an extension.
# If filename does not have an extension, API appends file's extension from its metadata.
# If filename has 1 or more extensions and the last one corresponds to metadata, filename is not going to be changed.
# If filename has 1 or more extensions and the last one does not correspond to metadata, API shaves all the extensions and appends file's extension from its metadata.
Some behaviours should be changed:
# do not remove period, do same as 2 — to be discussed. [[ https://test.wikipedia.org/wiki/File:MP_sounds_renamed..png | File:MP_sounds_renamed..png ]] is possible. It may be useful to upload files with pathetic ellipsis.
# do same as 2 — to be discussed. In general it should do 2 but some “intellectual” cases may be added: say, if file's metadata type is png, filename is MP_sounds_great.jpg and MP_sounds_great.png does not exist, it may shave .jpg and append actual extension.