mirror of
https://github.com/TheCaduceus/FileStreamBot.git
synced 2026-01-15 16:33:25 -03:00
Bump to v1.3
This commit is contained in:
@@ -5,7 +5,6 @@ from bot import TelegramBot
|
||||
from bot.config import Telegram
|
||||
from bot.server.error import abort
|
||||
|
||||
|
||||
async def get_message(message_id: int):
|
||||
message = None
|
||||
|
||||
@@ -39,6 +38,7 @@ async def get_file_properties(msg: Message):
|
||||
if not media: abort(400, 'Unknown file type.')
|
||||
|
||||
file_name = getattr(media, 'file_name', None)
|
||||
file_size = getattr(media, 'file_size', 0)
|
||||
|
||||
if not file_name:
|
||||
file_format = {
|
||||
@@ -53,4 +53,4 @@ async def get_file_properties(msg: Message):
|
||||
|
||||
mime_type = guess_type(file_name)[0] or 'application/octet-stream'
|
||||
|
||||
return file_name, mime_type
|
||||
return file_name, file_size, mime_type
|
||||
|
||||
Reference in New Issue
Block a user