Добавление картинки в PREVIEW_PICTURE или DETAIL_PICTURE
Код |
---|
$picUrl = 'http://some.org/somepic.jpg';
$name = urldecode(basename($picUrl));
$base64cont = base64_encode(file_get_contents($picUrl));
BX24.callMethod('entity.item.add', {
ENTITY: 'menu_new',
DATE_ACTIVE_FROM: new Date(),
DETAIL_PICTURE: array($name, $base64cont),
NAME: 'Hello, world!',
PROPERTY_VALUES: {
test: 11,
test1: 22,
test_file: ''
},
SECTION: 219
}); |