mirror of
https://github.com/appwrite/appwrite
synced 2026-05-15 13:08:31 +00:00
520 B
520 B
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
);