appwrite/docs/examples/1.7.x/client-web/examples/storage/update-file.md

17 lines
451 B
Markdown
Raw Normal View History

2025-05-17 14:25:38 +00:00
import { Client, Storage } from "appwrite";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const storage = new Storage(client);
const result = await storage.updateFile(
'<BUCKET_ID>', // bucketId
'<FILE_ID>', // fileId
'<NAME>', // name (optional)
["read("any")"] // permissions (optional)
);
console.log(result);