1

I'm using the standard rest API that salesforce suggest for upload files : /services/data/v43.0/sobjects/ContentVersion - and converting the file to base64 blob on the VersionData param.

I want to know simply : What is the max size in MB that I can upload with this method?

I saw in one place that the limitation is standing on 50 MB : https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contentversion.htm - Please see : "VersionData".

And on the other hand 2GB : https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm

Can someone please help? thanks!

3

This is explicitly stated at the top of the document from the second link:

You can insert or update blob data using a non-multipart message, but you are limited to 50 MB of text data or 37.5 MB of base64–encoded data.

In other words, both values that are quoted are correct; it depends on which API and method you use to upload the file.

  • I'm still trying to get it - using multipart message with the standard salesforce API : /services/data/v43.0/sobjects/ContentVersion - Should I need to something more than just add multipart/form-data to the Header under Content Type? Thanks, and sorry if it silly question - just trying to understand @sfdcfox – ItaiR Nov 19 '18 at 10:43
  • @ItaiR it should be Content-Type: multipart/form-data; boundary="boundary_string" The semi-colon and boundary attribute are important here. – sfdcfox Nov 19 '18 at 12:10
  • Thanks!! :) @sfdcfox – ItaiR Nov 19 '18 at 12:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.