added test for previewing shared resource inside project space (#7544)

This commit is contained in:
Prajwol Amatya
2023-10-26 12:59:34 +05:45
committed by GitHub
parent 890b8bf991
commit 2bee588977
4 changed files with 61 additions and 0 deletions
+5
View File
@@ -84,6 +84,7 @@ class SharingHelper {
* @param string|null $expireDate An expire date for public link shares.
* This argument expects a date string
* in the format 'YYYY-MM-DD'.
* @param string|null $space_ref
* @param int $ocsApiVersion
* @param int $sharingApiVersion
* @param string $sharingApp
@@ -104,6 +105,7 @@ class SharingHelper {
$permissions = null,
?string $linkName = null,
?string $expireDate = null,
?string $space_ref = null,
int $ocsApiVersion = 1,
int $sharingApiVersion = 1,
string $sharingApp = 'files_sharing'
@@ -157,6 +159,9 @@ class SharingHelper {
if ($expireDate !== null) {
$fd['expireDate'] = $expireDate;
}
if ($space_ref !== null) {
$fd['space_ref'] = $space_ref;
}
$headers = ['OCS-APIREQUEST' => 'true'];
return HttpRequestHelper::post(
$fullUrl,