0

I've got a mobile app using the Salesforce Mobile SDK and I want to upload a large ~10mb JSON file.

I'm trying to use sendRequest on endpoint: /services/data/sobjects/ContentVersion in order to create a file in the org but I am getting an error: message: "Required fields are missing: [VersionData]" which I don't understand.

How can I fix this issue or is there a different solution I can use to upload my data?

Here's the sendRequest I've got so far:

sendRequest(
            '/services/data',
            '/v39.0/sobjects/ContentVersion',
            () => { console.log('success!!') },
            (e) => { console.log('no success', e) },
            'POST',
            {
                ReasonForChange: 'Debugging',
                PathOnClient: filename
            },
            {
                "Content-Type": 'text/json',
            }
        );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.