src/File.php
public function upload($files)
    {
        $files = (array) $files;
        $pending_file_attachments = [];
        foreach ($files as $filename) {
            if (!is_file($filename)) {
                throw new Exception("Not file exist $filename");
            }
        }
        foreach ($files as $filename) {
            $params = ['file'=> self::getFileParam($filename)];
            $pending_file_attachments[] = $this->rest->upload(
                'pendingfiles',
                $params
            );
        }

        return join(',', $pending_file_attachments);
    }
public function upload($files)
    {
        $files = (array) $files;
        $pending_file_attachments = [];
        foreach ($files as $filename) {
            if (!is_file($filename)) {
                throw new Exception("Not file exist $filename");
            }
        }
        foreach ($files as $filename) {
            $params = ['file'=> self::getFileParam($filename)];
            $pending_file_attachments[] = $this->rest->upload(
                'pendingfiles',
                $params
            );
        }

        return join(',', $pending_file_attachments);
    }
public function upload ( $ files ) { $ files = ( array ) $ files ; $ pending_file_attachments = [ ] ; foreach ( $ files as $ filename ) { if ( ! is_file ( $ filename ) ) { throw new Exception ( "Not file exist $filename" ) ; } } foreach ( $ files as $ filename ) { $ params = [ 'file' => self :: getFileParam ( $ filename ) ] ; $ pending_file_attachments [ ] = $ this -> rest -> upload ( 'pendingfiles' , $ params ) ; } return join ( ',' , $ pending_file_attachments ) ; }
Step 1. Upload the file

POST /pendingfiles

Send your file to POST /pendingfiles.xml using the FORM field "file".
You will still need to authenticate yourself by passing your API token.

If the upload is successful, you will get back something like:
tf_1706111559e0a49

@param mixed $files
@return string
@throws \TeamWorkPm\Exception
Step 1 . Upload the file