I'm new in c#,and write this code:
const string file ="http://ipaddress/"+"1.jpg";
var fileName = file.Split('\\').Last();
using (var fileStream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read))
{
var fts = new FileToSend(fileName, fileStream);
await Bot.SendPhotoAsync(update.Message.Chat.Id, fts, "Nice Picture");
}
but in this line:
using (var fileStream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read))
get this error:
URI formats are not supported
How can i solve that problem ?thanks.