for my Email-On-Topic-Extension
, I've written a bridge for Telegram-Channels (not yet in the release). A forum topic can bidirectionally synchronize with a telegram-channel, but such tings like images are ignored.
I would need to import files from telegram as attachments into phpBB with my extension. The bot-user used to bring telegram messages to bhpBB, does not login. The telegram-Webhook is verified by an extra-password and the extension writes the posts directly to the database without user login.
So which functions should I use to create an attachment? There should still be checks for allowed file extensions.