1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-23 12:18:48 +02:00

51 lines
960 B
Markdown
Raw Normal View History

---
sidebar_position: 9
---
# Get file block
Make file block for SendMessage method
`Function GetFileBlock(Val Name, Val URL) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Name | --title | String | Picture name |
| URL | --url | String | File URL |
Returns: Structure - FileBlock
<br/>
:::tip
Blocks at API documentation: [Link](https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=93&CHAPTER_ID=07867)
:::
<br/>
```bsl title="Code example"
2024-10-03 20:35:39 +03:00
Name = "Image";
2024-10-04 13:35:56 +03:00
URL = "https://openyellow.neocities.org/test_data/document.docx";
2024-10-03 20:35:39 +03:00
Result = OPI_Bitrix24.GetFileBlock(Name, URL);
```
```sh title="CLI command example"
oint bitrix24 GetFileBlock --title %title% --url %url%
```
```json title="Result"
2024-10-04 13:35:56 +03:00
{
"FILE": {
"NAME": "Image",
"LINK": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx"
}
}
```