Download a File
Download a File to a temporarily file or a given directory or file.
You must have permissions to read the field that the file was uploaded to for this request to succeed.
download(string $id, string $directory = null): SplFileObject
|The id of the File to download|
|Optional The directory to save the download to. The file's |
original name will be preserved. Defaults to a local temporary directory.
|returns||The downloaded File|
<?php /* * This example demonstrates downloading a File */ require_once(__DIR__ . '/vendor/autoload.php'); use Catalytic\SDK\CatalyticClient; $catalytic = new CatalyticClient(); $file = $catalytic->files()->download('924cd388-addb-42f7-913e-24c9beb17635'); echo "File downloaded to " . $file->getPathname() . PHP_EOL;
Updated over 2 years ago