This article describes how to download attachments from an item in SystemWeaver using the SystemWeaverClientAPI.


Note: There must be a file repository initialized for your SystemWeaver server.


Example

            IswItem item = SWConnection.Instance.Broker.GetItem(SWHandleUtility.ToHandle("x04000000088411D7"));
            
            // The directory where the files are to be saved.
            string directoryPath = "C:\\Temp";

            // The attachments on the item.
            IswFileRevisions attachments = item.Files;
            foreach (IswFileRevision attachment in attachments)
            {
                // Save the file to disc.
                attachment.SaveFileByName(directoryPath + "\\" + attachment.Name);
            }