View Single Post
  #1 (permalink)  
Old 04-24-2008, 01:33 PM
TimWhite TimWhite is offline
Junior Member
 
Join Date: Apr 2008
Posts: 2
Default "Clean" Action Output?

Hi -

public function indexAction() {
...
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$this->getResponse()->renderExceptions(true);
$this->getResponse()->setHeader('Content-Type', 'image/jpeg');
$this->getResponse()->setBody($myobject->imageBlob);
$this->getResponse()->sendResponse();
}

I'm trying to return a binary image stream as the result of my action. I see the image data, but it has two characters prepended on the front of the data.

I can get the same database/data to work when I have a simple .php file retrieve the data from the database and return it, but when I do it as an action, there is still some stuff being injected at the front that I can't seem to turn off...

Any ideas?

Thanks!

Tim
Reply With Quote