Documentation

user.userfield.file.get

Method allows getting file from user field.

Example

The file type field UF_USR_1604998606834 is available. The method user.current can get a file in this field for current user, where:
showUrl - URL that shows file in browser, when user is logged in покажет файл в браузере если пользователь авторизован;
downloadData - данные, которые нужно подавать на этот метод.

   [UF_USR_1604998606834] => Array
                (
                    [id] => 774
                    [showUrl] => /bitrix/services/main/ajax.php?action=rest.file.get&SITE_ID=s1&entity=USER&id=1&field=UF_USR_1604998606834&value=774
                    [downloadData] => Array
                        (
                            [id] => 1
                            [field] => UF_USR_1604998606834
                            [value] => 774
                        )

                )

Request via webhook:

/rest/1/a2ebx1rfao5pq5cr/user.userfield.file.get?id=1&field=UF_USR_1604998606834&value=774

Method returns file as content as download and not as json/xml.



© «Bitrix24», 2001-2024