public function withFile($key, $path, $mimeType = '', $postFileName = '')
    {
        $fileData = array(
            'fileName'     => $path,
            'mimeType'     => $mimeType,
            'postFileName' => $postFileName,
        );

        $this->packageOptions[ 'files' ][ $key ] = $fileData;

        return $this->containsFile();
    }
public function withFile($key, $path, $mimeType = '', $postFileName = '')
    {
        $fileData = array(
            'fileName'     => $path,
            'mimeType'     => $mimeType,
            'postFileName' => $postFileName,
        );

        $this->packageOptions[ 'files' ][ $key ] = $fileData;

        return $this->containsFile();
    }
public function withFile ( $ key , $ path , $ mimeType = '' , $ postFileName = '' ) { $ fileData = array ( 'fileName' => $ path , 'mimeType' => $ mimeType , 'postFileName' => $ postFileName , ) ; $ this -> packageOptions [ 'files' ] [ $ key ] = $ fileData ; return $ this -> containsFile ( ) ; }
Add a file to the request

@param   string $key          Identifier of the file (how it will be referenced by the server in the $_FILES array)
@param   string $path         Full path to the file you want to send
@param   string $mimeType     Mime type of the file
@param   string $postFileName Name of the file when sent. Defaults to file name

@return Builder
Add a file to the request