We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f9ed80 commit 2acec9dCopy full SHA for 2acec9d
1 file changed
user_guide_src/source/libraries/files.rst
@@ -68,6 +68,15 @@ the results in kilobytes or megabytes, respectively::
68
$kilobytes = $file->getSize('kb'); // 250.880
69
$megabytes = $file->getSize('mb'); // 0.245
70
71
+**getSizeByUnit()**
72
+
73
+Returns the size of the uploaded file default in bytes. You can pass in either 'kb' or 'mb' as the first parameter to get
74
+the results in kilobytes or megabytes, respectively::
75
76
+ $bytes = $file->getSizeByUnit(); // 256901
77
+ $kilobytes = $file->getSizeByUnit('kb'); // 250.880
78
+ $megabytes = $file->getSizeByUnit('mb'); // 0.245
79
80
**getMimeType()**
81
82
Retrieve the media type (mime type) of the file. Uses methods that are considered as secure as possible when determining
0 commit comments