In ApiUpload, the ignorewarnings flag allows the same image to be uploaded under multiple names. That may be surprising, and is not documented on [[https://www.mediawiki.org/wiki/API:Upload|API:Upload]]. It may be useful to have more control over which warnings should be ignored.
**Originally filed as:**
Wikimedia Commons API allows to upload same file several times
Steps to Reproduce:
- Using upload-by-url, I first imported [[ https://www.esa.int/var/esa/storage/images/esa_multimedia/images/2020/05/abu_dhabi/22040628-1-eng-GB/Abu_Dhabi.jpg | this file ]] as [[ https://commons.wikimedia.org/wiki/File:Abu_Dhabi_(22040639).jpeg | Abu Dhabi (22040639).jpeg ]].
- I performed accidentally the same operation again with a different file name and the API allowed the upload as [[ https://commons.wikimedia.org/wiki/File:Abu_Dhabi_ESA22040639.jpeg | File:Abu_Dhabi_ESA22040639.jpeg ]]. The same sha1 hash has been computed.
Actual Results:
- Wikimedia Commons API allows to upload the same file several times
Expected Results:
- Wikimedia Commons API forbids to upload the same file several times