# Cowboy: how to stream (Partial Content 206) a video?

**URL:** <https://erlangforums.com/t/cowboy-how-to-stream-partial-content-206-a-video/3055>\
**Category:** Questions / Help\
**Tags:** http, cowboy\
**Created:** [November 26, 2023, 11:32am UTC](https://erlangforums.com/t/cowboy-how-to-stream-partial-content-206-a-video/3055 "2023-11-26T11:32:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zabrane](https://erlangforums.com/letter_avatar_proxy/v4/letter/z/7ba0ec/32.png) [@zabrane](https://erlangforums.com/u/zabrane)\
**Post date:** [November 26, 2023, 11:32am UTC](https://erlangforums.com/t/cowboy-how-to-stream-partial-content-206-a-video/3055/1 "2023-11-26T11:32:11Z")

</div>

Hi guys,

I’ve a large `.mp4` video (~300MB) that I’d like to stream with `Cowboy` (2.10.0).

I tried to put the video and serve is a static file, but Cowboy doesn’t stream it and send it with HTTP response code `200 OK`.

Is there a way to configure Cowboy to steam this particular video by using [Partial Content 206](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206) instead?

Many thanks

---

<div class="post-metadata">

**Author:** ![fancycade](https://erlangforums.com/user_avatar/erlangforums.com/fancycade/32/1187_2.png) [@fancycade](https://erlangforums.com/u/fancycade)\
**Post date:** [November 26, 2023, 4:44pm UTC](https://erlangforums.com/t/cowboy-how-to-stream-partial-content-206-a-video/3055/2 "2023-11-26T16:44:56Z")

</div>

Someone posted a stream handler implementation a few weeks ago:

> [@A documented Cowboy Stream Handler reference implementation](https://erlangforums.com/t/a-documented-cowboy-stream-handler-reference-implementation/3001):
>
> Hi everyone! I had to write a cowboy stream handler for work this week, and in the process, I put together this little reference module with comments to use as a jumping off point for when I have to write these in the future. Someone pointed out that I should share it online, so here it is! Figured others might find a use for it.

---

<div class="post-metadata">

**Author:** ![zabrane](https://erlangforums.com/letter_avatar_proxy/v4/letter/z/7ba0ec/32.png) [@zabrane](https://erlangforums.com/u/zabrane)\
**Post date:** [November 26, 2023, 5:43pm UTC](https://erlangforums.com/t/cowboy-how-to-stream-partial-content-206-a-video/3055/3 "2023-11-26T17:43:48Z")

</div>

@fancycade thanks a lot
