I'm working on a super-strict setting for adding images to Custom Fields in the Post Edit screen. My optimal scenario would be to add a a Custom Error message when the user tries to upload an image of the wrong size for that specific custom value.
I'm aware I can do this with any custom uploader, but I'd really prefer to do it with the regular Media Uploader. I'm also aware of the wp_handle_upload_prefilter which I already use to validate filenames and generate custom error messages based on generic requirements. What I need right now is a way to use custom requirements to reject uploads based on which field we're uploading to.
I'm also aware of Differentiate Featured Image from Post Images upon Upload but I wanted a pre-save solution.
This would look something like this:
Any ideas on how to go about informing
wp_handle_upload_prefilter ( or a similar ) of which field we're dealing with?