File Listing - size on 1KB boundary

I have a file that i uploaded with a size of 6 bytes. When I perform the File Listing API call, the size of the file is reported as 1024 bytes. The file size are being reported on a 1 KB boundary.

Yes, this is correct, it is by design.


Can you expand on the design? I was thinking that the size would be the size of the file that is being listed.

We want to influence the users to store small data blobs in the database and larger blocks of data in files. Applications that creates hundreds of thousands of super small files may greatly impact the overall performance of the system, so we had to come up with a compromise in a way we count file space allocation.



Thanks for the info. The use of the file size was planned as a step in validating that the requested file was downloaded entirely. Perhaps adding another column that isn’t displayed in the console by is something on the lines of ActualSize : 845 for example.

You can check the Content-Length http response header, it will have the exact value.

Thanks, that will work

It would be very convenient to have it returned along with the rest of the meta data on each file from call the Directory file listing API, (which would be available for every SDK.). For now, I will have to use the length returned from the HTTP header.