【发布时间】:2011-10-01 13:17:42
【问题描述】:
我正在使用 Magento Soap Api 上传产品图片。我似乎无法指定我希望 Magento 的名称,因此即使我根据 Magento 文档指定了“名称”,也将文件保存在服务器上。
我使用的是 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
)
)
);
【问题讨论】: