getFilePath
Attention! We strongly recommend first to learn more about Sites module REST documentation to understand how the module functions (with REST available in Bitrix24 Self-hosted editions). View this documentation as useful source when working with Bitrix24 Self-hosted editions and find out more details about API and only REST is not enough.
public static function File::getFilePath( $fileId );
Gets system file path.
Equal to the method CFile::getPath, including the same returned result with exception that the method checks file association to Site module for security reasons. Otherwise, returns null.
Parameters
Parameter | Description |
---|---|
fileId | File ID |
Example
if (\Bitrix\Main\Loader::includeModule('landing')) { $file = Bitrix\Landing\File::getFilePath($fileId); }
© «Bitrix24», 2001-2024