Blacklist certain filename patterns
Closed, ResolvedPublic

Description

Author: dstoykov

Description:
Mediawiki should allow blacklisting certain filename patterns for new files being uploaded. Particularly, blocking the patterns used by certain camera/scanner models, such as (DSC_[0-9]{4}\.jpg), will prevent users from uploading images with camera-generated filenames and force them to rename the to-be-uploaded files to something more meaningful.


Version: unspecified
Severity: enhancement

bzimport added a project: MediaWiki-Uploading.Via ConduitNov 21 2014, 9:47 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz10735.
bzimport created this task.Via LegacyJul 29 2007, 2:47 AM
bzimport added a comment.Via ConduitJul 29 2007, 3:14 AM

danny.b wrote:

You can use Javascript checking of the form and return some kind of notice saying something like "Please choose more descriptive name" when user clicks on upload button.

Also good upload manual on MediaWiki:Uploadtext can have preventive effect.

bzimport added a comment.Via ConduitJul 29 2007, 10:52 AM

danny.b wrote:

Bug 709 (rename/move files) is related and once fixed, this one loses its sense.

bzimport added a comment.Via ConduitJul 31 2007, 1:58 AM

dstoykov wrote:

(In reply to comment #2)

Bug 709 (rename/move files) is related and once fixed, this one loses its
sense.

Not quite so, I think. Giving users a notice and forcing them to rename the file will habituate them to do it right in the future. Having someone else fix it will encourage them to do it wrong again next time.

bzimport added a comment.Via ConduitJul 31 2007, 2:58 AM

dstoykov wrote:

(In reply to comment #1)

You can use Javascript checking of the form and return some kind of notice
saying something like "Please choose more descriptive name" when user clicks on
upload button.

Doing it on the client-side does have some advantages, although I was under the impression that MediaWiki struggles to keep the amount of js used at minimum. It might also be impossible to make it compatible with different skins.

Also good upload manual on MediaWiki:Uploadtext can have preventive effect.

On en.wikipedia.org it already says "Please choose a descriptive name for the destination filename in order to prevent duplicate names (for instance, "Cat.jpg" would not be a good name)". Doesn't help much - ignorant users just don't read. The "free images only" warning is even bigger, still masses of obvious copyvios get uploaded all the time.

Raymond added a comment.Via ConduitSep 26 2007, 10:05 AM

This was done with r25620 and r25637 with a configurable blacklist: [[MediaWiki:Filename-prefix-blacklist]].

Gilles added a project: Multimedia.Via WebDec 4 2014, 10:49 AM
Gilles moved this task to Closed on the Multimedia workboard.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.