OneDrive - Wrong size for PNG files

后端 未结 2 1615
甜味超标
甜味超标 2020-12-22 06:57

When uploading certain PNG files the size is incorrectly reported on the OneDrive website and in the Photo object returned by the REST API. This can be reproduced using the

相关标签:
2条回答
  • 2020-12-22 07:22

    Ryan from OneDrive here. We looked into this and have a good understanding of what's going wrong with the size. OneDrive computes the "space" a file takes up in our system by using the size of the largest data stream associated with a file. When an image is uploaded to OneDrive, we also create thumbnails for images so that we can quickly show various views in our clients and website.

    In the case of this particular file, one of the JPG thumbnails we create for the PNG file is actually larger than the original file (due to the JPG compression not being as effective as PNG for this image). As a result, the thumbnail is actually the largest stream on the file. As you can imagine, that doesn't happen very often, but for this image (and others like it) we have this bug.

    We have a bug tracking the issue and are investigating how we can fix the API to return the size of the "default" stream -- the stream that represents the actual contents of the file. I don't have an ETA for the fix, but we're working on it.

    0 讨论(0)
  • 2020-12-22 07:26

    FWIW, I appreciate your post, I discovered that is seems to be the same issue with the Android Onedrive SDK post I made a couple weeks ago

    Does OneDrive change/re-encode jpg files?

    It doesn't seem like anyone from MS is actually monitoring these SO tags very closely, so I'm creating a Github issue on the Android SDK, maybe that will produce an answer.

    https://github.com/liveservices/LiveSDK-for-Android/issues/37

    0 讨论(0)
提交回复
热议问题