Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d08be1 commit c043117Copy full SHA for c043117
src/Symfony/Component/HttpFoundation/File/File.php
@@ -133,4 +133,18 @@ protected function getName($name)
133
134
return $originalName;
135
}
136
+
137
+ /**
138
+ * {@inheritdoc}
139
+ */
140
+ public function getSize()
141
+ {
142
+ // Since stream wrappers and stream filters can change the file contents as read, the only
143
+ // reliable way to get the effective size of the file is to actually read it.
144
+ ob_start();
145
+ $size = readfile($this->getPathname());
146
+ ob_end_clean();
147
148
+ return $size;
149
+ }
150
0 commit comments