I am ultimately trying to use data loader to migrate our chatter posts & comments that have files attached to them. They were originally added by uploading directly from computer to the comment. It looks like API version 36 and above, you are supposed to use the ContentVersion object to insert a new file, and then make references to them using the FeedAttachment object.
I've already migrated the users, collaborationGroups, collaborationGroupMembers, FeedItems and am stuck with getting the FeedComments that have files attached.
When I am inserting the ContentVersion objects, I would like to retain the original document properties and list the ownerID as the original user with their new cross referenced ID. However, I keep getting the following error:
Documents in a user's private library must always be owned by that user.
If I leave the ownerID blank, it defaults to my id but successfully inserts into the new org.
This is an example of the data I'm inserting.
- OWNERID: 005o0000002DMoTXXW
- TITLE: title of file
- PATHONCLIENT: C:\sfdc-migration\old org\attachments\myfile.pdf
- VERSIONDATA: C:\sfdc-migration\old org\attachments\myfile.pdf
- DESCRIPTION: description of file
- ORIGIN: H
- Am I able to set the owner ID to the original owner?
- If I insert with my own ID, am I able to easily update to the correct owner in a subsequent step?
- Is there an easy way to upload the file directly with the comments? In 35 and before, you can upload the files directly with the feedItem object, but it doesn't look like that is possible with feedComments?