Maybe ?just maybe ?? this could be a suitable place for.... some AI? Have files checked for things that look like Private Keys (and other things the user probably doesn't want to upload), and highlight that before uploading so the user can confirm or refuse the upload as needed?
(And also education about how to design your system so there is less chance of uploading Private Keys in the first place?)