C
C
chelkaz2018-08-17 12:46:23
1C-Bitrix
chelkaz, 2018-08-17 12:46:23

How to remove one photo from a multiple file property?

How to remove one photo from a multiple file property?
Elements have a multiple property type file (photo).
The task is this, you need to leave only photos with the jpg extension in it, and delete the rest

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-08-18
@chelkaz

Resave the array with photos adding to those that need to be deleted DEL => Y.
I.e. follow the link from the previous answer and look there for how to add a file to the File multiple property. There it is.
Of course, you do not need to add - you will resave the same array, but by adding the DEL key with the Y value to those arrays that contain data on the images you need to delete.

A
Alexander, 2018-08-17
@idruweb

https://dev.1c-bitrix.ru/api_help/iblock/classes/c...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question