I am programatically adding files to list item attachments. But when I open the file, and try to hit save, they throw a read only dialog box.
int FileLength = File1.PostedFile.ContentLength;
if (File1.PostedFile != null && File1.HasFile)
Stream fStream = File1.PostedFile.InputStream;
byte contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
myWeb.AllowUnsafeUpdates = true;
SPAttachmentCollection attachments = enquiry.Attachments;
myWeb.AllowUnsafeUpdates = false;
What could I have missed?
View Complete Post