public function uploadAsset($filePath)
    {
        $params = array( 'file' => '@'.$filePath );
        $params = $this->validator->validate($params);
        $this->validator->validateAssetFile($params['file']);

        try {
            return $this->client->sendRequest('assets', $params, 'POST');
        } catch (\Exception $ex) {
            throw $ex;
        }
    }
public function uploadAsset($filePath)
    {
        $params = array( 'file' => '@'.$filePath );
        $params = $this->validator->validate($params);
        $this->validator->validateAssetFile($params['file']);

        try {
            return $this->client->sendRequest('assets', $params, 'POST');
        } catch (\Exception $ex) {
            throw $ex;
        }
    }
public function uploadAsset ( $ filePath ) { $ params = array ( 'file' => '@' . $ filePath ) ; $ params = $ this -> validator -> validate ( $ params ) ; $ this -> validator -> validateAssetFile ( $ params [ 'file' ] ) ; try { return $ this -> client -> sendRequest ( 'assets' , $ params , 'POST' ) ; } catch ( \ Exception $ ex ) { throw $ ex ; } }
Uploads new asset to HTMLPDFAPI server

@param $filePath     Path to the file to upload
@return response
@throws \Exception
Uploads new asset to HTMLPDFAPI server