src/Services/ApiConnector.php
/** Add a file to your server request.
     * @param $path (must be the root path)
     * @param $mimetype
     * @param $inputName
     * @throws ApiConnectorException
     * @return $this
     */
Add a file to your server request.
Add a file to your server request .
public function addFile($path, $mimetype, $inputName)
    {
        if(!file_exists($path)) throw new ApiConnectorException('File '.$path.' not found!');
        if($inputName == '__token') throw new ApiConnectorException('__name is a reserved word from ApiConnector class. Please use another inputName');
        $this->files[] = new \CURLFile($path, $mimetype,$inputName);
        return $this;
    }
public function addFile ( $ path , $ mimetype , $ inputName ) { if ( ! file_exists ( $ path ) ) throw new ApiConnectorException ( 'File ' . $ path . ' not found!' ) ; if ( $ inputName == '__token' ) throw new ApiConnectorException ( '__name is a reserved word from ApiConnector class. Please use another inputName' ) ; $ this -> files [ ] = new \ CURLFile ( $ path , $ mimetype , $ inputName ) ; return $ this ; }
Add a file to your server request.
Add a file to your server request .