mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-42666 repository_boxnet: Downloading a file follows locations
This commit is contained in:
parent
102a241998
commit
51ada519a6
1 changed files with 2 additions and 1 deletions
|
@ -58,7 +58,8 @@ class boxnet_client extends oauth2_client {
|
|||
* @return bool Success or not.
|
||||
*/
|
||||
public function download_file($fileid, $path) {
|
||||
$result = $this->download_one($this->make_url("/files/$fileid/content"), array(), array('filepath' => $path));
|
||||
$result = $this->download_one($this->make_url("/files/$fileid/content"), array(),
|
||||
array('filepath' => $path, 'CURLOPT_FOLLOWLOCATION' => true));
|
||||
return ($result === true && $this->info['http_code'] === 200);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue