Unable to Upload files to ZFS in Zoho CRM API
- fileVariable = invokeurl
- [
- url: "https://file-examples-com.github.io/uploads/2017/10/file-sample_150kB.pdf"
- type: GET
- ];
- fileVariable.setParamName("file");
- response = invokeurl
- [
- url :"https://www.zohoapis.com/crm/v3/files"
- type :POST
- files: fileVariable
- connection:"crm_oauth_connection"
- ];
- info response;
I tried implementing in in my code. Here is what I came up with:
- imageUrl = https://www.sampleurl.com/sampleimage.jpg
- // Fetcth the image
- downloadResponse = invokeurl
- [
- url :imageUrl
- type :GET
- ];
- downloadResponse.setParamName("file");
- response = invokeurl
- [
- url: "https://www.zohoapis.com/crm/v3/files"
- type: POST
- files: downloadResponse
- connection:"internal_crm"
- ];
- info response;
However, when I try to run the code, the console shows "Error at line : 13, Error due to - '{0}'". Can anyone help me with this error?