Upload a File to Catalytic.
Returns a reference to the uploaded file.
uploadFile(SplFileObject $file): File
|The File to upload|
|returns||The uploaded File|
<?php /* * This example demonstrates uploading a File to Cataltyic */ require_once(__DIR__ . '/vendor/autoload.php'); use Catalytic\SDK\CatalyticClient; $catalytic = new CatalyticClient(); $fileToUpload = new SplFileObject('/Users/alice/work/foobar.txt'); $file = $catalytic->files()->upload($fileToUpload); echo "Uploaded file has ID " . $file.id;
Updated almost 2 years ago