I got stuck in a situation. I uploaded a file in Sharepoint programmatically in C# using the CSOM library,
FileCreationInformation newfile = new FileCreationInformation();
byte[] FileContent = dstStream.ToArray();
newfile.ContentStream = new MemoryStream(FileContent);
newfile.Url = strfilename;
Microsoft.SharePoint.Client.File uploadfile = destiFolder.Files.Add(newfile);
context.Load(uploadfile);
context.ExecuteQuery();
I used above mentioned approach to upload a file in a particular folder.
Now the thing is I need to update that file's 'Created By'/'Modified By' field with another Username.
So can anybody help me out of this ?