cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object: getting Error message "Failed to load resource: the server responded with a status of 400"

Manthan_Nayak
Contributor

Hi Team,

I am trying to upload file through custom object using rest API call. Below the steps I following, 

1. Created a Basic HTML input file upload control to read the file and encoded the file by base64.

2. Call ajax method to uploaded the file using the link (baseUSR+'/api/core/content/attachment') by following body updating  the AttachementName and the Base64 value for the AttachmentBytes.

3. Then get the response (file ID) from step2, Then take that file id and going to update the attachment field, getting the Error message "Failed to load resource: the server responded with a status of 400"

Here I have attached custom Object script for your reference. Could you please help me, where I have missed anything to construct header request or something else? 

 

 

 

 

 

0 REPLIES 0