dart-lang/labs

feat: storage.writeBytes should support `Stream<List<int>>`

felangel opened this issue · 1 comments

As a developer, I want to be able to upload files to google cloud storage without having to read the entire file into memory.

Desired Usage

final bucket = storage.bucket(myBucket);
final object = await bucket.writeByteStream(path, file.openRead());

I missed that write returns a StreamSink 🎉