Migrate to a monorepo structure (#2909)
This commit is contained in:
11
packages/twenty-server/src/utils/stream-to-buffer.ts
Normal file
11
packages/twenty-server/src/utils/stream-to-buffer.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { Readable } from 'stream';
|
||||
|
||||
export const streamToBuffer = async (stream: Readable): Promise<Buffer> => {
|
||||
const chunks: any[] = [];
|
||||
|
||||
for await (const chunk of stream) {
|
||||
chunks.push(chunk);
|
||||
}
|
||||
|
||||
return Buffer.concat(chunks);
|
||||
};
|
||||
Reference in New Issue
Block a user