You need to sign in to do that
Don't have an account?
How to export VersionData from ContentVersion object for Large files
I am trying to pull contentVersion out of one org and push it into another cloud based file storage system and it is providing a lot of challenge given that I am unable to find a way to export the VersionData field for large files.
Has anyone found a way to do this? Here is what I have tried (and failed):
Batch Apex - failed whenever a file larger than the heap space (12MB for batch) was queried
Bulk API using Java - you are not even allowed to query the VersionData field... wish I knew this before I wrote a whole program to retrieve it...
I am at a loss as to how to export the data in a way that I can rebuild it and upload to another cloud based system.
any help is greatly appreciated as I am going mad :(
1) https://developer.salesforce.com/forums?id=9060G000000Bc2vQAC
Let us know if you need more help ?
<force:recordData aura:id="recordLoader"
recordId="{!v.recordId}"
fields="Id,Title,VersionData,PathOnClient"
targetError="{!v.recordLoadError}"
targetFields="{!v.fileRecord}"
recordUpdated="{!c.handleRecordUpdate}"
/>
for handling the multiple files you have to handle the recordId dynamically. You can do this by using the code below.
component.set("v.recordId",currentRecId);
var RecordId = component.get("v.recordId");
/component.find("recordLoader").set("v.recordId", RecordId);
component.find("recordLoader").reloadRecord();
This worked for me hope this works for you as well.
Mark this as a best answer if its helpful.
Thanks
Mandeep