You need to sign in to do that
Don't have an account?
mandar
Downloading attachments via API
I'm trying to download via the API, about 250 MB worth of attachments that our support team has attached to cases to free up some space. The files have different formats like jpeg, doc, xls, etc. I looked at the API. The Body and Name fields in the Attachment object seems to have what I need to create the object locally. However, I don't know what the next step should be to convert it from byte[] to the final object on disk locally. I'm using C#, Visual Studio 2005, .Net Framework 2.0. Can some one point me to some sample code/documentation in this regard?
Thanks in advance!
Thanks in advance!
using (FileStream fs = new FileStream(@"c:\someFile.jpg", FileMode.Create)) {
fs.Write(buff, 0, buff.Length);
}
where buff is your byte[] from the query or retrieve call.