I’d attach a debug log, but there’s nothing relevant in it!
Replying to myself to say that I found that the NUMBER in that uri is the ID in the object table. Uploaded media is getting saved to the right directory, and the corresponding item is created in the object table, but the item can’t be updated in the UI to add the media description (which is … the name value in the JSON data?). Why can’t that field be updated?
This turned out to be related to a specific mistake I made when trying to fix a broken configuration. I recreated my prod.secret.exs by exporting and editing my configuration, but I didn’t include the required Pleroma.Web.Endpoint declaration in the replacement file. After adding the declaration (copied from a backup) everything works as expected now.