appwrite/docs/examples/1.3.x/server-dotnet/examples/storage/create-file.md
2024-11-06 12:07:14 +01:00

485 B

using Appwrite; using Appwrite.Services; using Appwrite.Models;

var client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("5df5acd0d48c2") // Your project ID .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

var storage = new Storage(client);

File result = await storage.CreateFile( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]", file: InputFile.FromPath("./path-to-files/image.jpg"));