[php] fix #3114 stream proxy function using the file cmd corresponds to range request

This commit is contained in:
nao-pon
2020-02-23 18:23:28 +09:00
parent c2c210c81c
commit 79a838be29
7 changed files with 90 additions and 8 deletions
+10
View File
@@ -1573,6 +1573,16 @@ class elFinderVolumeBox extends elFinderVolumeDriver
'headers' => array('Authorization: Bearer ' . $this->token->data->access_token),
);
// to support range request
if (func_num_args() > 2) {
$opts = func_get_arg(2);
} else {
$opts = array();
}
if (!empty($opts['httpheaders'])) {
$data['headers'] = array_merge($opts['httpheaders'], $data['headers']);
}
return elFinder::getStreamByUrl($data);
}