How to return file from webhook?

I created a separate thread for this — it might be useful to someone