mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
398 B
398 B
import 'dart:io'; import 'package:appwrite/appwrite.dart';
// Init SDK Client client = Client(); Storage storage = Storage(client);
client .setProject('5df5acd0d48c2') // Your project ID ;
Future result = storage.createFile( file: new File('./image.jpg'), read: [], write: [], );
result .then((response) { print(response); }).catchError((error) { print(error); });