public function downloadPublicFileWithRange($range){
$token = $this->lastShareData->data->token;
$fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav";
- $headers['Range'] = $range;
$client = new GClient();
$options = [];
public function downloadPublicFileInsideAFolderWithRange($path, $range){
$token = $this->lastShareData->data->token;
$fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav" . "$path";
- $headers['Range'] = $range;
$client = new GClient();
$options = [];
public function getSabreClient($user) {
$fullUrl = substr($this->baseUrl, 0, -4);
- $settings = array(
+ $settings = [
'baseUri' => $fullUrl,
'userName' => $user,
- );
+ ];
if ($user === 'admin') {
$settings['password'] = $this->adminUser[1];
} else {
$settings['password'] = $this->regularUser;
}
+ $settings['authType'] = SClient::AUTH_BASIC;
return new SClient($settings);
}
/*Set the elements of a proppatch, $folderDepth requires 1 to see elements without children*/
public function changeFavStateOfAnElement($user, $path, $favOrUnfav, $folderDepth, $properties = null){
$fullUrl = substr($this->baseUrl, 0, -4);
- $settings = array(
+ $settings = [
'baseUri' => $fullUrl,
'userName' => $user,
- );
+ ];
if ($user === 'admin') {
$settings['password'] = $this->adminUser[1];
} else {
$settings['password'] = $this->regularUser;
}
+ $settings['authType'] = SClient::AUTH_BASIC;
+
$client = new SClient($settings);
if (!$properties) {
$properties = [