Buenos Días Amigos,
Podria alguien decirme como hacer para que con el siguiente código me tome
el archivo desde el equipo cliente por favor, ya que me lo está tomando del
servidor:
string srcUrl = @"c:\Borrar.doc";
if (!File.Exists(srcUrl))
{
throw new ArgumentException(String.Format("{0} does not
exist", srcUrl), "srcUrl");
}
FileStream fStream = File.OpenRead(srcUrl);
string fileName = fStream.Name.Substring(3);
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
sapl412.Lists listService = new sapl412.Lists();
listService.Credentials= System.Net.CredentialCache.DefaultCredentials;
string addAttach = listService.AddAttachment("Responsables_SIERC", "1",
fileName, contents);
Mil Gracias!!!
Leer las respuestas