Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
I am trying to upload a file into pardot , I was able to do it using API with insomnia.
Screenshot 2023-07-18 at 15.17.02.png
I wanted to reproduce same step with Talend using trest component with in http body :
String requestBody =
"--BOUNDARY\r\n"
+"Content-Disposition: form-data; name=\"file\"; filename=\"pardot_prospect_insert_2.csv\"\r\n"
+
"Content-Type: text/csv\r\n"
+
"TECH_Contact_ID_18__c,campaignId,email,zKPI_b2c_rating_total__c\r\n"
+
"0031v00002HgLA8AAN,111111,xxxxxx@gmail.com,30\r\n"
+
"--BOUNDARY--"
;and header
Screenshot 2023-07-18 at 15.19.37.png
But still have the error
:"No file was specified or uploaded" due to an error of syntax based on the api documentation. Any clue how to solve this issue please ?Hello @Ayari Hanene ,
Seems the problem is that tREST can't find the filename path, could you please provide the whole absolute file path for the filename in the requestBody like:
...
filename=\"C:/test/pardot_prospect_insert_2.csv\"
...
Best regards
Aiming
Thank you for your reply ! it's always KO.
Actually with insomnia the file content is appended to the body of the rest request, I guess the problem should be in the syntax.
"TECH_Contact_ID_18__c,campaignId,email,zKPI_b2c_rating_total__c"
"0031v00002HgLA8AAN,111111,xxxxxx@gmail.com,30\r\n"