Hi,
You need dispose the stream when you opened it.
byte[] data = new byte[args.FileSize];
using(Stream stream=args.OpenStream())
{
stream.Read(data,0,data.Length);
}
AFSFile file = new AFSFile(data, "FolderName", "", args.FileName)
file.Save();
Regards , Terry.