Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tkfinitefield committed Jun 2, 2024
1 parent eaa35ff commit 9a8dbf1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/dart_firebase_admin/lib/src/storage/storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,18 @@ class Storage {

late final _client = _StorageHttpClient(app);

Future<void> upload(storage1.Object object, String bucket) async {
Future<void> upload({
required String bucket,
required String name,
required Uint8List data,
}) async {
final object = storage1.Object(
name: name,
);
storage1.Media(
Stream.value(data),
data.length,
);
await _client.v1((client) async {
await client.objects.insert(object, bucket);
});
Expand Down

0 comments on commit 9a8dbf1

Please sign in to comment.