4 answers
Hi Sunil,You must be hitting the following limit"You can insert or update blob data using a non-multipart message, but if you do, you are limited to 50 MB of text data or 37.5 MB of base64–encoded data and that is the reason you are not able to load the content version via Rest api"https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm⌗inserting_a_contentversionDid you try using any other way of loading other than using Java cide? This should be possible using any tools capable of generating multipart POST requests (e.g. Curl, Fiddler, C⌗/.NET client applications, etc.).In multipart message the first part of the request message body contains non–binary field data such as the Description or Name. The second part of the message contains the binary data of the file that you're uploading.Example for creating a new Document via curl:curl https://na1.salesforce.com/services/data/v23.0/sobjects/Document/ -H "Authorization: Bearer token" -H "Content-Type: multipart/form-data; boundary=\"boundary_string\"" --data-binary @newdocument.jsonExample request body for creating a new DocumentThis code is the contents of newdocument.json. Note that the binary data for the PDF content has been omitted for brevity and replaced with “Binary data goes here.” An actual request will contain the full binary content.--boundary_stringContent-Disposition: form-data; name="entity_document";Content-Type: application/json{"Description" : "Marketing brochure for Q1 2011","Keywords" : "marketing,sales,update","FolderId" : "005D0000001GiU7","Name" : "Marketing Brochure Q1","Type" : "pdf"}--boundary_stringContent-Type: application/pdfContent-Disposition: form-data; name="Body"; filename="2011Q1MktgBrochure.pdf"Binary data goes here.--boundary_string--Example response body for creating a new DocumentOn success, the ID of the new Document is returned.{"id" : "015D0000000N3ZZIA0","errors" : [ ],"success" : true}If this is failing with other apps as well, we know you are hitting the limit. Otherwise there could be an issue with Java codeKindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. Thank you!Anudeep