Documentation

lists.element.get.file.url

lists.element.get.file.url (
   params
)

This method returns path to a file. If successful, returns an array with a list of url for the required File-type or a File (Disk)-type field.

Parameters

Method Description Available from version
params All fields are required.
  • IBLOCK_TYPE_ID - ID of information block type:
    • lists - information block type for lists;
    • bitrix_processes - information block type for processes;
    • lists_socnet - information block type for group lists. In this case, parameter SOCNET_GROUP_ID - group ID must be passed.
  • IBLOCK_ID - information block ID
  • ELEMENT_ID - element ID
  • FIELD_ID - ID for the field (information block properties) of File or FIle (Disk) type, without "PROPERTY_" prefix
  • SEF_FOLDER: '/my_section/lists/' - path to folder to be handled by component. Optional parameter. By default, value is selected depending on one of the information block system types.

Example

var params = {
    'IBLOCK_TYPE_ID': 'lists',
    'IBLOCK_ID': '41',
   'ELEMENT_ID': '683',
   'FIELD_ID': '120'
};
BX.rest.callMethod(
   'lists.element.get.file.url',
   params,
   function(result)
   {
       if(result.error())
           alert("Error: " + result.error());
       else
           console.log(result.data());
   }
)

User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix Inc.», 2001-2019, «Bitrix Inc.», 2019