Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
None of the sites have proper instructions.Not true, there are offs. docs - docs.aiogram.dev . But since I have not worked with this library and do not plan to, I do not want to read them for you.
@dp.message_handler(content_types=['photo'])
async def scan_message(msg: types.Message):
document_id = msg.photo[0].file_id
file_info = await bot.get_file(document_id)
print(f'file_id: {file_info.file_id}')
print(f'file_path: {file_info.file_path}')
print(f'file_size: {file_info.file_size}')
print(f'file_unique_id: {file_info.file_unique_id}')
file_id: AgACAgIAAxkBAAIO2WBd12gIEuhnEzsUgfS_VguqIVMLAAK5sDEb0qrwSiETN9pic8VjZPdZoi4AAwEAAwIAA20AA3dRAAIeBA
file_path: photos/file_48.jpg
file_size: 12946
file_unique_id: AQADZPdZoi4AA3dRAAI
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question