Page MenuHomePhabricator

Upload warning "non-descriptive name" too strict
Open, LowPublicBUG REPORT

Description

The following warning appears when you use IMG etc in teh beginnging of a file name on Special:Upload

The name of the file you are uploading begins with "[IMG / JD etc]", which is a non-descriptive name typically assigned automatically by digital cameras. Please choose a more descriptive name for your file.

No it appears whenever [IMG / JD etc] is used in the filename, no matter what the rest of the filename looks like:

For instance "JD - Very unique text.gif" shouldn't return the warning as IMG / JD etc can also be an abbreviation for whatever.


Version: unspecified
Severity: trivial

Details

Reference
bz23806

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:07 PM
bzimport set Reference to bz23806.
bzimport added a subscriber: Unknown Object (MLST).

Is this on a WMF wiki or where is this?

it's MediaWiki so all wiki's are affected :P

that may not be the case, most of these restrictions are put into place via the title blacklist of the local wiki, which is why I asked the question, so PLEASE answer the question.

Can't reproduce. The code does check the beginning if ( substr( $partname, 0, strlen( $prefix ) ) == $prefix ) {, UploadBase.php:1126 and I can upload files with CIMG at the middle without the warning being shown http://test.wikipedia.org/wiki/File:12_CIMG_34.png

Tested and confirmed for the beginning of titles on my own wiki and mediawiki.org.

Yes, it shows the warning then it's at the beginning. But not when it's in the middle. Thus as expected.

I don't understand why a warning is a bad thing here. False positives are rare and there is an optional override for the warning. Suggest WONTFIX or INVALID.

Bryan.TongMinh wrote:

Perhaps we should change the blacklist to only trigger if the prefixes are followed by a number.

I didn't say it's too bad, just not proper. If my title reads "JD - Very unique text.jpg", the uploader shouldn't tell me to "choose a more descriptive name".

Maybe if followed by numbers or only a few characters?

Just to note here, I've seen cameras with filenames like "IMGX-001" too. So solely numerical numbers after "IMG" wouldn't improve the warn function.

Bryan.TongMinh wrote:

(In reply to comment #10)

Just to note here, I've seen cameras with filenames like "IMGX-001" too. So
solely numerical numbers after "IMG" wouldn't improve the warn function.

How about beginning with IMG and any sequence of 3 consecutive numbers?

Perhaps it may make sense to restrict the check to filenames no longer than 12 characters, since all cameras are conforming to 8.3.

However, any change we make, will break some usages IMHO.

15 *additional* characters should be enough to describe a file.

Change-Id: I3851b2e34571dc44706408a425541b9395aa4793

The list of file prefix to blacklist is stored in message 'filename-prefix-blacklist'.

This blacklist is still to strict. The "Scan" prefix for example blocks any filename starting with "Scandinavia"

Aklapper changed the subtype of this task from "Task" to "Bug Report".Feb 5 2022, 2:33 PM
Aklapper removed a subscriber: wikibugs-l-list.