thrace-project / media-bundle

The `ThraceMediaBundle` handles file, video, audio and image upload plus some image manipulations.
MIT License
11 stars 10 forks source link

mb_strlen wrong defines length #3

Open slowprog opened 10 years ago

slowprog commented 10 years ago

Hello,

_mbstrlen wrong defines the length of my pic when rendered temporary image (rote _thrace_media_image_rendertemporary). It looks like this:

wrong

But if change call of _mbstrlen and add 8bit:

// Thrace\MediaBundle\Controller\ImageController.php
...
$response->headers->set('Accept-Ranges', 'bytes');
$response->headers->set('Content-Length', mb_strlen($content, '8bit'));
$response->headers->set('Content-Type', $this->getMimeType($content));
...

then it will be fine:

good

zender commented 10 years ago

thanks. I will fix that.