Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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:

C#
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?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900