Files
appwrite/docs/examples/1.5.x/server-php/examples/storage/create-file.md
T
2025-04-22 17:02:33 +04:00

511 B

<?php use Appwrite\Client; use Appwrite\InputFile; use Appwrite\Services\Storage; $client = (new Client()) ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint ->setProject('') // Your project ID ->setSession(''); // The user session to authenticate with $storage = new Storage($client); $result = $storage->createFile( bucketId: '', fileId: '', file: InputFile::withPath('file.png'), permissions: ["read("any")"] // optional );