mirror of
https://github.com/appwrite/appwrite
synced 2026-05-19 23:18:40 +00:00
480 B
480 B
import 'dart:io'; import 'package:appwrite/appwrite.dart';
Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>'); // Your project ID
Storage storage = Storage(client);
File result = await storage.createFile( bucketId: '<BUCKET_ID>', fileId: '<FILE_ID>', file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), permissions: ["read("any")"], // optional );