I would highly appreciate if the storage-abstraction interface would offer a method to save a Readable Stream to a file. Right now, this is only possible by using a workaround like this:
Unfortunately this code is neither performant nor comprehensible.
Proposed solution
I suggest to add method addFileFromStream(fileStream: Readable, targetPath: string): Promise<void> to the storage-abstraction API. Using such a method could look like this:
Problem to solve
I would highly appreciate if the storage-abstraction interface would offer a method to save a Readable Stream to a file. Right now, this is only possible by using a workaround like this:
Unfortunately this code is neither performant nor comprehensible.
Proposed solution
I suggest to add method
addFileFromStream(fileStream: Readable, targetPath: string): Promise<void>
to the storage-abstraction API. Using such a method could look like this: