2019-11-16 22:32:05 +02:00
# uploadStickerFile
## Description
2020-04-11 20:15:03 +03:00
Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
2019-11-16 22:32:05 +02:00
## Arguments
| Name | Type | Description |
| - | - | - |
| `user_id` | `#!python3 int` | User identifier of sticker file owner |
2020-05-02 23:01:32 +03:00
| `png_sticker` | `#!python3 InputFile` | PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. |
2019-11-16 22:32:05 +02:00
## Response
Type: `#!python3 File`
Description: Returns the uploaded File on success.
## Usage
2020-04-11 20:15:03 +03:00
### As bot method
2019-11-16 22:32:05 +02:00
```python3
result: File = await bot.upload_sticker_file(...)
```
### Method as object
Imports:
2019-12-11 16:52:21 +02:00
- `from aiogram.methods import UploadStickerFile`
- `from aiogram.api.methods import UploadStickerFile`
- `from aiogram.api.methods.upload_sticker_file import UploadStickerFile`
2019-11-16 22:32:05 +02:00
2020-01-11 22:59:14 +02:00
#### In handlers with current bot
2019-11-16 22:32:05 +02:00
```python3
2020-01-11 22:59:14 +02:00
result: File = await UploadStickerFile(...)
2019-11-16 22:32:05 +02:00
```
2020-01-11 22:59:14 +02:00
#### With specific bot
2019-11-16 22:32:05 +02:00
```python3
2020-01-11 22:59:14 +02:00
result: File = await bot(UploadStickerFile(...))
2019-11-16 22:32:05 +02:00
```
2020-01-11 22:59:14 +02:00
2019-11-16 22:32:05 +02:00
## Related pages:
- [Official documentation ](https://core.telegram.org/bots/api#uploadstickerfile )
- [aiogram.types.File ](../types/file.md )
2020-01-11 22:59:14 +02:00
- [aiogram.types.InputFile ](../types/input_file.md )
- [How to upload file? ](../sending_files.md )