function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jaelee125jaelee125 

LWC component to upload new version of files

Does Salesforce provide any mechanism to upload new versions of files using lwc? They have lightning-file-upload component lwc to upload files but there doesn't seem to be one to upload new version.

I'm trying to avoid using lightning-file-upload component and use onuploadfinished to manually create a new content version using the content document that was just inserted. Anyone have any workarounds or solutions?
Best Answer chosen by jaelee125
VinayVinay (Salesforce Developers) 
Hi Jaelee,

I am afraid this might not be possible currently.

Thanks,

All Answers

VinayVinay (Salesforce Developers) 
Hi Jaelee,

Check below link which has workaround to upload a New Version of an Existing File using lightning:fileUpload

https://salesforce.stackexchange.com/questions/215030/how-to-upload-a-new-version-of-an-existing-file-using-lightningfileupload-light

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
jaelee125jaelee125
Hi Vinay,

This solution will not work for us. The whole point of us trying find a way to upload new version of files using lwc is so that the users don't open up a preview and click on upload new version to do it. Otherwise we can just go the Salesforce file and click on upload new version.

We bascially want to mimic upload new version that is currently available for File. We just want to be able to initiate that from different object record's page.
VinayVinay (Salesforce Developers) 
Hi Jaelee,

I am afraid this might not be possible currently.

Thanks,
This was selected as the best answer