I have a similar situation where I have a ton of web forms that create cases and if the user is in Classic, they are auto-forwarded to that case's Classic File Attachment page (the one where it's step 1: select file, step 2: attach file, step 3: click done). I couldn't figure out how to link directly to the new file upload button, so instead I set up a trigger on Attachment, with a Before and After, to move attachments over to files.
trigger AttachmentSaver on Attachment (after insert, before insert) {
if (Trigger.isInsert) {
if (Trigger.isBefore) {
for (Attachment att : Trigger.new) {
ContentVersion cv = new ContentVersion();
cv.PathOnClient = att.Name;
cv.Title = att.Name;
cv.Description = att.Name;
cv.VersionData = att.body;
cv.FirstPublishLocationId = att.ParentId;
insert cv;
att.description = att.Name + '-relocatedToFiles';
}
}
if (Trigger.isAfter) {
delete [select id from Attachment WHERE id in :Trigger.new AND description like '%-relocatedToFiles'];
}
}
}
It's not exactly the most elegant since it involves creating two attachments and immediately deletes one of them, but this ensures that anything we have that link directly to the classic File Attachment page will ultimately create ContentVersion files. If users are using Lightning, they are taken to a page where they can drag and drop files, so once everyone is migrated (hopefully soon), this code can be removed.
I know this is an older post, but hopefully this helps someone. Or, if it is a terrible idea and someone knows of a better way, that would be good to know.