Uploading profile photo results in PHOTO_EXT_INVALID
hi guys i want upload new photo for profile this my code
TLInputFile uploadedFile = new TLInputFile();
Task.Run(async()=> uploadedFile = (TLInputFile)await client.UploadFile("tass", new StreamReader("E:\\tass.png"))).Wait();
var changeRequest = new TeleSharp.TL.Photos.TLRequestUploadProfilePhoto()
{
File= new TLInputFile() {
Id=uploadedFile.Id,
Parts=uploadedFile.Parts,
Name=uploadedFile.Name,
Md5Checksum=uploadedFile.Md5Checksum,
},
Dirty=true,
Sequence=(int)uploadedFile.Id
};
dynamic changeResult = null;
Task.Run(async () => changeResult = await client.SendRequestAsync<TLInputPhoto>(changeRequest)).Wait();
but return this error "PHTO_EXT_INVALID"

please help me
please help me guys
Try to use "jpeg" image?
used all image extentions
you know how to change profile phtoto ??
you need to change this: Task.Run(async()=> uploadedFile = (TLInputFile)await client.UploadFile("tass", new StreamReader("E:\tass.png"))).Wait();
to this: Task.Run(async()=> uploadedFile = (TLInputFile)await client.UploadFile("tass.png", new StreamReader("E:\tass.png"))).Wait();
but I get an "InvalidCastException" error. BUT everything works. go throw that error with "try catch" and thats it
add a type like photo.png to the file name