I need to convert files like pdf and word into links. Is it possible to convert files into attachments? If I click on the link, the file should be downloaded. I tried the below code for getting a link. But it could be opened on our computer only and not opened on another computer because that computer does not have this pdf. Then how to convert the file to a link using c#.
var urlFile = new System.Uri(@"D:\ImagePdf.pdf");
var linkPath = urlFile.AbsoluteUri;
linkPath
output is file:///D:/ImagePdf.pdf