...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
- Класс: \CCrmRestProxyBase
- Вызов: CCrmRestProxyBase::externalizeProductFile
protected function externalizeProductFile($productID, $fieldName, $valueID, $fileID, $dynamic = true) { $handlerUrl = "/bitrix/components/bitrix/crm.product.file/download.php"; $showUrl = CComponentEngine::MakePathFromTemplate( "{$handlerUrl}?productId=#product_id#&fieldName=#field_name#&dynamic=#dynamic#&fileId=#file_id#", array( 'field_name' => $fieldName, 'file_id' => $fileID, 'product_id' => $productID, 'dynamic' => $dynamic ? 'Y' : 'N' ) ); $downloadUrl = CComponentEngine::MakePathFromTemplate( "{$handlerUrl}?auth=#auth#&productId=#product_id#&fieldName=#field_name#&dynamic=#dynamic#&fileId=#file_id#", array( 'auth' => $this->getAuthToken(), 'field_name' => $fieldName, 'file_id' => $fileID, 'product_id' => $productID, 'dynamic' => $dynamic ? 'Y' : 'N' ) ); $result = array( 'id' => $fileID, 'showUrl' => $showUrl, 'downloadUrl' => $downloadUrl ); if ($dynamic) $result = array( 'valueId' => $valueID, 'value' => $result ); return $result; }