MadelineProtoDocs/docs/API_docs/constructors/upload_fileCdnRedirect.md

49 lines
1.5 KiB
Markdown
Raw Normal View History

2018-04-01 13:19:25 +02:00
---
title: upload.fileCdnRedirect
2018-12-26 02:56:50 +01:00
description: File cdn redirect
2018-04-04 19:52:48 +02:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
2018-04-01 13:19:25 +02:00
---
2018-04-05 01:19:57 +02:00
# Constructor: upload.fileCdnRedirect
2018-04-01 13:19:25 +02:00
[Back to constructors index](index.md)
2018-12-26 02:56:50 +01:00
File cdn redirect
2018-04-01 13:19:25 +02:00
### Attributes:
2018-12-26 02:56:50 +01:00
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
|dc\_id|[int](../types/int.md) | Yes|DC ID|
|file\_token|[bytes](../types/bytes.md) | Yes|File token|
|encryption\_key|[bytes](../types/bytes.md) | Yes|Encryption key|
|encryption\_iv|[bytes](../types/bytes.md) | Yes|Encryption iv|
|file\_hashes|Array of [FileHash](../types/FileHash.md) | Yes|File hashes|
2018-04-01 13:19:25 +02:00
### Type: [upload\_File](../types/upload_File.md)
### Example:
```php
2018-06-29 13:59:08 +02:00
$upload_fileCdnRedirect = ['_' => 'upload.fileCdnRedirect', 'dc_id' => int, 'file_token' => 'bytes', 'encryption_key' => 'bytes', 'encryption_iv' => 'bytes', 'file_hashes' => [FileHash, FileHash]];
2018-04-01 13:19:25 +02:00
```
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
2018-06-29 13:59:08 +02:00
{"_": "upload.fileCdnRedirect", "dc_id": int, "file_token": {"_": "bytes", "bytes":"base64 encoded bytes"}, "encryption_key": {"_": "bytes", "bytes":"base64 encoded bytes"}, "encryption_iv": {"_": "bytes", "bytes":"base64 encoded bytes"}, "file_hashes": [FileHash]}
2018-04-01 13:19:25 +02:00
```
Or, if you're into Lua:
2018-04-01 13:19:25 +02:00
```lua
2018-06-29 13:59:08 +02:00
upload_fileCdnRedirect={_='upload.fileCdnRedirect', dc_id=int, file_token='bytes', encryption_key='bytes', encryption_iv='bytes', file_hashes={FileHash}}
2018-04-01 13:19:25 +02:00
```