This will be a glad news for all salesforce developers who were looking for an apex switch statement for decades to simplify most of the lengthy apex statements. Exactly 10years back there has been an Idea posted on the Idea exchange for this.
IdeaExchange Link – https://success.salesforce.com/ideaView?id=08730000000BrSIAA0
I have uploaded an attachment (salesfiorce_migration_guide.pdf) to an opportunity record from classic salesforce. The uploaded document record has the following actions where ‘view’ action is a link to download the file.
Next, uploading another file (router-sample.pdf) to the same opportunity record using upload file functionality in lightning. The uploaded files in the above and current scenario are shown below.