I am trying to create blob pages because I need random access in the future, although I can upload a file when I upload it, the size is different.
I upload the file "file.docx" and then upload as "file2.docx". The loaded one is slightly larger, in fact its size is rounded to the page size of the blob page, 512 :) In this particular case, Microsoft Word gives me a warning that the file is damaged, but I can still open it, and the content is what i expected.
I got a sample code here: Using Blazs Blogs for Windows Azure and How to Load and Download Blobs Pages Effectively . I checked the code to download it and the documentation, and, apparently, loading your page should start at a border of 512 bytes (startOffset% 512 == 0) and end at a border of 512 - 1. Then what happens when I need to download a file, which does not match 512?
For example, if I have a file with 550 bytes, and I upload it and upload, I get a file with 1024 bytes, right? What should I do? save original file size in metadata or is there a way to do it right? (or an example).
Thanks in advance.
source share