Skip to content

Save the file

After the upload screen, add the Flow action Save Content Version. In a subscriber org the class is three_levers.CreateContentVersion.

Action inputMap from
File Base64imageData64 from the upload screen. Required.
File NamefileName, or fileName plus fileExtension. Required.
Parent Record IdThe record that should own the file. Required.
Owner IdOptional. Blank means the running user.

The action returns a status, the file size, and a Content Version Id. When the file is missing from the parent record, confirm Parent Record Id is a real record the running user can see, and that the user can run the Apex class.

You can also create a ContentVersion record yourself and map imageData64 to VersionData. PathOnClient should be the file name plus the extension. Use the packaged action when you want the parent link handled for you.