I'm uploading a Word document from my desktop to SharePoint via the browser (Firefox, although I don't think that matters). If I then download the file that I just uploaded and compare it with the original file I uploaded it from on my desktop, they don't match. This comparison failure doesn't happen with a PDF file. Something on the SP side is changing the uploaded file.
I noticed this because I'm attempting to use the CSOM with C# to copy a file, but only after comparing and it doesn't match the original, in which case it should create a version with the today's date appended to the name. (I'm reading the file using OpenBinaryDirect and putting it into a byte array for comparison.) However, it keeps creating a new copy, even though the files should be identical.
Two questions:
- Is there a better way to compare the files (maybe a SharePoint CSOM method) besides comparing the byte arrays? I don't mind comparing the byte arrays, but when I know the files should be equal, and they don't match, something strange is up, and I'm guessing beyond my control.
- Any ideas on what's being changed in the files?