// Encode binary datas on the XML in the webservices

This commit is contained in:
rGaillard
2012-09-20 12:05:12 +00:00
parent 81828e46a0
commit f492b58482
2 changed files with 5 additions and 1 deletions
@@ -978,7 +978,7 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
$this->imgToDisplay = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$image->image_format;
$this->objOutput->setFieldsToDisplay('full');
$this->output = $this->objOutput->renderEntity($image, 1);
$image_content = array('sqlId' => 'content', 'value' => file_get_contents($this->imgToDisplay));
$image_content = array('sqlId' => 'content', 'value' => base64_encode(file_get_contents($this->imgToDisplay)), 'encode' => 'base64');
$this->output .= $this->objOutput->objectRender->renderField($image_content);
}
elseif (in_array($this->imageType, array('categories', 'manufacturers', 'suppliers', 'stores')))