function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vijay BharghavVijay Bharghav 

Unable to insert binary documents using BULK API

HI

 

 

I have created a Tar file which has reuqest.txt and my Binary Attachment, but using the sample code which has been provided in Bulk API i am unable to insert Attachments.

 

I have converted the content type to :job.setContentType(ContentType.ZIP_CSV); and used connection.createBatchFromZipStream(jobInfo, tmpInputStream); .  I am getting the exception stateMessage='InvalidBatch : Referenced file "request.txt" is missing or is a directory'. 

 

Content in request.txt is

Name,ParentId,Body
Test.pdf,a0O9000000C4UujEAF,#Test.pdf

 

Please let me know is there any way to insert Binary File using Bulk APi

 

Regards

Bharghav

govindb1.396432156444516E12govindb1.396432156444516E12
Hi Vijay,

Add your requst.txt to the zip file you are referencing.

I hope it helps