You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have an access to several protected url-links that require additional headers for downloading/get request.
My bot has to frequently upload large files from such links, mainly audio.
I can't upload these files with just audio = URLInputFile(URL) feature - because the site also need headers.
Idea is to upgrade URLInputfile function, so that it can be invoked with headers:
audio = URLInputFile(url, headers=headers)
Describe the solution you'd like
I made a quick patch for URLInputfile (added headers to arguments) and stream_content, so that you can make something like that
Screenshots attached.
Look at the screenshots.
Now my code works like this:
audio = URLInputFile(url, headers=headers)
await message.answer_audio(audio)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have an access to several protected url-links that require additional headers for downloading/get request.
My bot has to frequently upload large files from such links, mainly audio.
I can't upload these files with just audio = URLInputFile(URL) feature - because the site also need headers.
Idea is to upgrade URLInputfile function, so that it can be invoked with headers:
audio = URLInputFile(url, headers=headers)
Describe the solution you'd like
I made a quick patch for URLInputfile (added headers to arguments) and stream_content, so that you can make something like that
Screenshots attached.
Look at the screenshots.
Now my code works like this:
audio = URLInputFile(url, headers=headers)
await message.answer_audio(audio)
The text was updated successfully, but these errors were encountered: