cool! another way would be:
@Get() @Header('Content-type', 'video/mp4') @Header('Content-Disposition', 'inline; filename="video.mp4"') getFile(): StreamableFile { const file = createReadStream(join(process.cwd(), 'videos/video.mp4')); return new StreamableFile(file); }
@micalevisk How a frontend client like react will receive the StreamableFile(file) ? If it was a large PDF file for example ? is there a way to send it / receive it piece by piece ?
Even better. very cool!!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
cool! another way would be:
@micalevisk How a frontend client like react will receive the StreamableFile(file) ? If it was a large PDF file for example ? is there a way to send it / receive it piece by piece ?
Even better. very cool!!