Files
appwrite/docs/examples/1.8.x/server-php/examples/storage/get-file.md
T

415 B

<?php

use Appwrite\Client;
use Appwrite\Services\Storage;

$client = (new Client())
    ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    ->setProject('<YOUR_PROJECT_ID>') // Your project ID
    ->setSession(''); // The user session to authenticate with

$storage = new Storage($client);

$result = $storage->getFile(
    bucketId: '<BUCKET_ID>',
    fileId: '<FILE_ID>'
);```