Merge pull request #11501 from Ansud/master
Urlencode file name before passing it to cURL
This commit is contained in:
commit
660e9c4012
|
@ -101,7 +101,8 @@ class LargeFileHelper {
|
|||
*/
|
||||
public function getFileSizeViaCurl($filename) {
|
||||
if (function_exists('curl_init')) {
|
||||
$ch = curl_init("file://$filename");
|
||||
$fencoded = urlencode($filename);
|
||||
$ch = curl_init("file://$fencoded");
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
|
|
Loading…
Reference in New Issue