You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Data units in responses of routes like listAllFiles, listAllCollections are now shifted to 'Bytes'. In their responses, keys like totalSize will now be a NUMBER (1024), instead of STRING (1024 Bytes OR 1 KB) which it was previously.
For doing its formatting on the front end, you can define this function in the SDK:
pretty(number){// Converts a number to proper data size unitsconstsizes=['Bytes','KB','MB','GB','TB','PB','EB','ZB','YB'];if(number===0){return'0 Bytes';}else{consti=Math.floor(Math.log(number)/Math.log(1024));returnparseFloat((number/Math.pow(1024,i)).toFixed(2))+' '+sizes[i];}}
The text was updated successfully, but these errors were encountered:
Data units in responses of routes like
listAllFiles
,listAllCollections
are now shifted to 'Bytes'. In their responses, keys liketotalSize
will now be a NUMBER (1024), instead of STRING (1024 Bytes OR 1 KB) which it was previously.For doing its formatting on the front end, you can define this function in the SDK:
The text was updated successfully, but these errors were encountered: