appwrite/docs/examples/1.1.x/client-flutter/examples/storage/get-file.md

23 lines
493 B
Markdown
Raw Normal View History

2022-11-16 23:35:44 +00:00
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Storage storage = Storage(client);
client
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
2022-11-16 23:35:44 +00:00
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = storage.getFile(
bucketId: '[BUCKET_ID]',
fileId: '[FILE_ID]',
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}