Manual:Hooks/UploadStashFile

Note that code which has not been updated for MediaWiki 1.28 may not call this hook. If your extension absolutely, positively must prevent some files from being uploaded, use or.

Details

 * : (object) An instance of UploadBase, with all info about the upload
 * : (object) An instance of User, the user uploading this file
 * : (array|null) File properties, as returned by . Note this is not always guaranteed to be set, e.g. in test scenarios. Call   yourself in case you need the information.
 * : output: If the file stashing should be prevented, set this to the reason in the form of  or a MessageSpecifier instance (you might want to use ApiMessage to provide machine-readable details for the API).