// Encode binary datas on the XML in the webservices
This commit is contained in:
@@ -124,6 +124,10 @@ class WebserviceOutputXMLCore implements WebserviceOutputInterface
|
||||
if ($field['value'] != '')
|
||||
$node_content .= '<![CDATA['.$field['value'].']]>';
|
||||
}
|
||||
|
||||
if (isset($field['encode']))
|
||||
$ret .= ' encode="'.$field['encode'].'"';
|
||||
|
||||
if (isset($field['synopsis_details']) && !empty($field['synopsis_details']) && $this->schemaToDisplay !== 'blank')
|
||||
{
|
||||
foreach ($field['synopsis_details'] as $name => $detail)
|
||||
|
||||
@@ -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')))
|
||||
|
||||
Reference in New Issue
Block a user