I just want to get msg from (any) channel and if it have media (check by flag) show it in pictureBox. howto show media in pictureBox from await client.DownloadFileAsync(photo, fileStream); or another functions with .Media field?
upd: the correct question is: how to show *.jpg file from DownloadFileAsync without saving to disk and work only with memory?
You can download the photo directly to a
MemoryStream.Remember to reset stream position to the beginning of file before using the downloaded content
Note: in order to use
awaitin your code, you must make your methodasync(for exampleasync void)