MadelineProtoDocs/old_docs/API_docs_v105/constructors/upload_fileCdnRedirect.md

43 lines
1.4 KiB
Markdown
Raw Normal View History

2019-09-13 17:13:55 +02:00
---
title: upload.fileCdnRedirect
2019-12-27 17:48:04 +01:00
description: The file must be downloaded from a [CDN DC](https://core.telegram.org/cdn).
2019-09-13 17:13:55 +02:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: upload.fileCdnRedirect
[Back to constructors index](index.md)
2019-12-27 17:48:04 +01:00
The file must be downloaded from a [CDN DC](https://core.telegram.org/cdn).
2019-09-13 17:13:55 +02:00
### Attributes:
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|dc\_id|[int](../types/int.md) | Yes|[CDN DC](https://core.telegram.org/cdn) ID|
|file\_token|[bytes](../types/bytes.md) | Yes|File token (see [CDN files](https://core.telegram.org/cdn)|
|encryption\_key|[bytes](../types/bytes.md) | Yes|Encryption key (see [CDN files](https://core.telegram.org/cdn)|
|encryption\_iv|[bytes](../types/bytes.md) | Yes|Encryption IV (see [CDN files](https://core.telegram.org/cdn)|
2019-09-13 17:13:55 +02:00
|file\_hashes|Array of [FileHash](../types/FileHash.md) | Yes|File hashes|
### Type: [upload\_File](../types/upload_File.md)
### Example:
```php
$upload_fileCdnRedirect = ['_' => 'upload.fileCdnRedirect', 'dc_id' => int, 'file_token' => 'bytes', 'encryption_key' => 'bytes', 'encryption_iv' => 'bytes', 'file_hashes' => [FileHash, FileHash]];
```
Or, if you're into Lua:
```lua
upload_fileCdnRedirect={_='upload.fileCdnRedirect', dc_id=int, file_token='bytes', encryption_key='bytes', encryption_iv='bytes', file_hashes={FileHash}}
```