2
我正在使用Magento Soap Api上传产品图片。我似乎无法指定我希望Magento的名称,以便像在服务器上那样保存文件,即使我按照Magento文档指定了“名称”。如何使用Magento Soap Api上传产品图片时指定文件名
我正在使用Magento 1.2.1.2,并且无法升级,因为该网站使用了在较新版本中打破的模块。
关于如何指定Magento保存图像的文件名的想法?
我正在使用的代码:
$client->call(
$session_id,
'catalog_product_attribute_media.create',
array(
$sku,
array(
'file' => array(
'content' => base64_encode(file_get_contents($filename)),
'mime' => $imageinfo['mime'],
'name' => $filename
),
'label' => $description,
'types' => array(
'image',
'small_image',
'thumbnail'
),
'exclude' => FALSE
)
)
);
谢谢!这工作完美。 – indexdotphp