mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 00:42:16 +00:00
Merge branch 'upload-limit'
# Conflicts: # app/Http/Helpers/helpers.php # config/vuefilemanager.php # public/chunks/app-others.js # public/chunks/files~chunks/shared-files~chunks/shared-page~chunks/trash.js # public/js/main.js # public/mix-manifest.json # resources/js/components/FilesView/FileItemList.vue # resources/js/components/FilesView/FilePreview.vue # resources/js/helpers.js # resources/js/store/modules/fileFunctions.js
This commit is contained in:
@@ -355,6 +355,25 @@ function format_gigabytes($gigabytes)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Format string to formated megabytes string
|
||||
*
|
||||
* @param $megabytes
|
||||
* @return string
|
||||
*/
|
||||
function format_megabytes($megabytes)
|
||||
{
|
||||
if ($megabytes >= 1000) {
|
||||
return $megabytes / 1000 . 'GB';
|
||||
}
|
||||
|
||||
if ($megabytes >= 1000000) {
|
||||
return $megabytes / 1000000 . 'TB';
|
||||
}
|
||||
|
||||
return $megabytes . 'MB';
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert megabytes to bytes
|
||||
*
|
||||
@@ -495,6 +514,7 @@ function get_file_type($file_mimetype)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get file type from mimetype
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user