Похожие чаты

Anyone familiar with aiohttp. ?.how to get name of the

file in here https://bin.nixnet.services/?b7524743589bc2c9#HCMof8cFV8DfNLvY5vMmxmK6hDkahaZDTdvCyn1jg3jC

12 ответов

39 просмотров

What you need is a buffer. You can use the io.BytesIO class in the standard library for that: https://docs.python.org/3/library/io.html?highlight=io#io.BytesIO

Link 🪈
What you need is a buffer. You can use the io.Byte...

Umm tqs but exactly my question is not only that ig. If user sends image nor documents i have to differentiate between them. How to know the file name which user sends nor how to chk whether it is a document or image or any other media? 🧐

Link 🪈
https://bfy.tw/TAuY

How do u chk file extension without knowing it's name or any attribute of it? 🙄

https://t.me/c/1111136772/193260 idk i am blindly opening an MP3 file and writing content. Idk how to get which type of file is being uploaded.

Link 🪈
How many links did you check?

Yep. Most of the links which u linked shows the way to get file extension if any file name not path is specified. Sorry if I am wrong nor blind. My requirement is to get the file name which is being uploaded. And also this https://t.me/c/1111136772/193287

Iɴᴅʀᴀᴊɪᴛʜ • 🇮🇳 •
https://t.me/c/1111136772/193260 idk i am blindly ...

I don't have any experience with aiohttp but the docs here: https://docs.aiohttp.org/en/stable/multipart.html#reading-multipart-responses clearly state that there's a helper field called filename.

Iɴᴅʀᴀᴊɪᴛʜ • 🇮🇳 •
Yep. Most of the links which u linked shows the wa...

Did you not read the docs before asking your question? They give you an example of how to do it, https://docs.aiohttp.org/en/stable/web_quickstart.html#file-uploads

I suppose your problem was solved, but, just in case, https://www.adamsmith.haus/python/answers/how-to-check-the-type-of-a-file-in-python That link was the 2nd result of https://t.me/c/1111136772/193277

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта