Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
Hi I try to download and save channel message's photo via TLSharp. So I do it with this code.
int filePart = 256 * 1024;
int offset = 0;
using (MemoryStream ms = new MemoryStream())
while (offset ().Last().Size)
resFile = await client.GetFile(new TLInputFileLocation()
LocalId = tf.LocalId,
Secret = tf.Secret,
VolumeId = tf.VolumeId
}, filePart, offset);
ms.Write(resFile.Bytes, 0, resFile.Bytes.Length);
offset += filePart;
img = Image.FromStream(ms);
img.Save(Path.Combine(HttpRuntime.AppDomainAppPath, "Content/images/TLimages/" + _messagePreview.MessagePreviewURL), System.Drawing.Imaging.ImageFormat.Jpeg);
It works at lots of channel message's photo. but for one message code failing. I cant understand. It doesnt go catch block. direct go failing an I have to log in again via authentication.
This is failing channel --> [https://t.me/TrinityCommunity](https://t.me/TrinityCommunity)
This is failing channel message --> [https://t.me/TrinityCommunity/72](https://t.me/TrinityCommunity/72)
I can download and save https://t.me/TrinityCommunity/179 with program automaticly.
I can download and save https://t.me/TrinityCommunity/178 with program automaticly.
I can download and save https://t.me/TrinityCommunity/73 with program automaticly.
But I cant download and save https://t.me/TrinityCommunity/72. I run it try and catch block but program doesnt go catch block. Memory fail. waiting but doesnt answer. I restart program but authentication fails everytime.
This is image of Visual Studio Developer's output
so4 chemical symbol
So everything look like very normal but I cant save this photo. Can u help?