Answer the question
In order to leave comments, you need to log in
How to update the image (preview_image) when updating or adding an infoblock element?
How can I apply my own code to a loaded image when updating or adding an infoblock element?
I'm trying to do it via AddEventHandler()
AddEventHandler('iblock', 'OnAfterIBlockElementUpdate', array('MyClass', 'OnAfterIBlockElementHandler'));
// ...
public function OnAfterIBlockElementHandler(&$arFields)
{
print_r($arFields['PREVIEW_PICTURE']);
}
Array (
[name] => Имя_файла.jpg
[type] => image/jpeg
[tmp_name] => /path/temp/620/default
[size] => 74463
[error] => 0
[description] =>
[COPY_FILE] => Y
[copy] => 1
[MODULE_ID] => iblock
[old_file] => 473084
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question