Or just mark the resource as private and only serve it to the user who created it until they associate a post with it.
You would probably need a separate server to stage images like this, as your main image server probably shouldn’t have a login wall, which probably slightly complicates things but not badly.
Matrix is good, though I’ve been reconsidering it ever since I read this: https://telegra.ph/why-not-matrix-08-07
Also I’ve considered it less than perfect since they added encryption and managed to make it a hell to set up. If you can’t get people to understand Mastodon because “yOu hAvE To cHoOsE A SeRvEr” how the hell are you going to get them to set up a Matrix account when it involves downloading files and other crap that you need to keep with you when setting up all your clients.
Revolt looks nice but until it’s possible to use one account (and browser tab) to access multiple servers (in the computing sense, not the Discord sense), it’s not going to be ideal as a Discord replacement.