I have created a Seafile Wrapper in PHP using the CodeIgniter framework.The seafile web API allows me to upload files to using cUrl. The following is a function I created to upload an existing file the post method defined in the api manual: https://manual.seafile.com/develop/web_api.html#upload-file-1
I would like to ask that you have a look at the code and help to structure this correctly. The cURL POST function in the wrapper works perfectly with other calls, but the below does not return an error nor does it work.
public function uploadFile($upload_link, $upload_file, $upload_filename){
return $this->decode($this->post($upload_link,
array(
'file' => new Curlfile('test.txt'),
'filename' => "test.txt",
'parent_dir' => "/"
)
));
}