mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-25 03:42:02 +00:00
61a70f6b52
move last message details in the `meta` JSONB column of conversations
8 lines
197 B
JavaScript
8 lines
197 B
JavaScript
export function formatBytes (bytes) {
|
|
if (bytes < 1024 * 1024) {
|
|
return (bytes / 1024).toFixed(2) + ' KB'
|
|
} else {
|
|
return (bytes / (1024 * 1024)).toFixed(2) + ' MB'
|
|
}
|
|
}
|