Enable Attachment Upload Summaries
Steps
XWiki can ask whoever attaches a file for a line describing the upload, and show that line against the version it belongs to in the attachment's history. The field is absent on a new installation, and one setting in xwiki.properties brings it out. Attachments introduces the other choices an administrator makes about an upload.
- Stop XWiki.
- Open xwiki/WEB-INF/xwiki.properties and find the block below. The last line ships commented out, with false on it; uncomment it and set it to true.
#-# [Since 16.3.0RC1] #-# Indicate whether or not comments for attachment uploads should be settable from UI, and displayed whenever the #-# attachment revisions are listed. The default is false. attachment.upload.enableComments=true - Start XWiki again.
- Attach a file to any Page. The upload form of the Attachments tab now opens on an "Upload summary" field, above the file chooser.

- Open the history of that attachment. What was typed stands in a "Summary" column, against the version it was uploaded with.

XWiki reads this setting from xwiki.properties and from nowhere else, so, unlike the mimetype restriction, it cannot be turned on for a single wiki or a single Page tree. It is on or off for the whole installation.
FAQ
What happens to the files attached before I turned it on?
Nothing. Their versions were stored without a summary and keep none, so the column stays empty on those rows. The field applies from the next upload on.
How long may a summary be?
Up to 1023 characters, the length of the field. It is meant for a line, the way the comment on a Page revision is.
My summary landed on a second version. Why?
Choosing the file is what uploads it, so the summary has to be in the field before you choose. Filling it afterwards and selecting "Attach" stores the file once without a summary and a second time with one.