forked from userxer/bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputFile.php
More file actions
30 lines (28 loc) · 871 Bytes
/
Copy pathInputFile.php
File metadata and controls
30 lines (28 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php namespace bot;
/**
* This object represents the contents of a file to be
* uploaded. Must be posted using multipart/form-data in
* the usual way that files are uploaded
* via the browser.
*
* @author Mehdi Khodayari <mehdi.khodayari.khoram@gmail.com>
* @since 2.0.1
*
* Class InputFile
* @package bot
* @link https://core.telegram.org/bots/api#inputfile
*/
class InputFile extends \CURLFile
{
/**
* InputFile constructor.
* @param string $filename path to the file which will be uploaded.
* @param string|null $mimetype mimetype of the file.
* @param string|null $postname name of the file.
*/
public function __construct($filename, $mimetype = null, $postname = null)
{
$path = \Yii::getAlias($filename);
parent::__construct($path, $mimetype, $postname);
}
}