diff --git a/src/MediaSource/MediaSourceService.php b/src/MediaSource/MediaSourceService.php index 2044ab00..af23c26a 100644 --- a/src/MediaSource/MediaSourceService.php +++ b/src/MediaSource/MediaSourceService.php @@ -206,6 +206,8 @@ class MediaSourceService { $content_length = stream_copy_to_stream($resource, $destination); + fclose($destination); + if ($content_length === FALSE) { throw new HttpException(500, "Request body could not be copied to $uri"); }