2020-04-10 20:31:49 +12:00
|
|
|
import 'package:appwrite/appwrite.dart';
|
|
|
|
|
|
|
|
// Init SDK
|
|
|
|
Client client = Client();
|
|
|
|
Storage storage = Storage(client);
|
|
|
|
|
|
|
|
client
|
|
|
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
|
|
;
|
|
|
|
|
2020-04-15 02:13:19 +12:00
|
|
|
String result = storage.getFilePreview(
|
2020-04-10 20:31:49 +12:00
|
|
|
fileId: '[FILE_ID]',
|
|
|
|
);
|
|
|
|
|
2020-04-15 02:13:19 +12:00
|
|
|
print(result); // Resource URL string
|