Example #1
0
 private static function addFile($path, Api\AddDocument $api)
 {
     if (!file_exists($path)) {
         throw new Error('path is invalid, file does not exist');
     }
     $content = file_get_contents($path);
     $api->addContent(base64_encode($content));
 }