Sharepoint / O365: Session uploaded file size reported by MS Graph does not equal local file size

Category

  • Question
  • Documentation issue
  • Bug

Expected or Desired Behavior

OneDrive should report the correct file size when uploaded

Observed Behavior

When uploading a file via a session upload, to an O365 sharepoint site, the file size of the object returned does not match the actual file which was uploaded.

Files that appear to report incorrect sizes are:

  • PDF
  • MS Office Documents
  • HTML files

Files that do not appear to report incorrect sizes are:

  • Text files

When uploading to a standard OneDrive Business Account, this behavior does not occur.

Steps to Reproduce

  • Upload a file via API using a session upload
  • Review session response for file upload completion and note the 'size' value
  • Compare the 'size' value to the actual file size

For further details, refer to abraunegg/onedrive#205 which provides additional diagnostic information