Hey guys,
I am working on an Illustrator extension project which uses HTML5 for UI and JavaScript for implementing functionalities.
Apart from HTML5 I am also using JQuery and AngularJS.
Illustrator SDK has an special feature where you can execute a process using it.
I need to pack a PDF file in a form and send it to a URL using HTTP Post.
I am using curl process from OSX, /usr/bin/curl. I checked it using GET method and POST method with empty form and it was returning 0 it means it was working.
I added the PDF file in form using following code:
var file = new FormData();
file.append("file",fpath);
and started the curl process as following:
var path='/usr/bin/curl -F ';
var d= '--data';
var result=window.cep.process.createProcess(path, url, d, file);
console.log("result"+result);
var dt = result.data;
console.log(dt);
curl error code was -1, which says
"This is not really an error. It means you should call curl_multi_perform again without doing select() or similar in between"
The way I am executing curl process is like I am running curl command on terminal.
What can I do to perform this curl_multi_perform from curl process?
I google it read quite a few tutorials but no luck. Can anyone help me here?