throw new OCSNotFoundException($this->l->t('Public link sharing is disabled by the administrator'));
}
- /*
- * For now we only allow 1 link share.
- * Return the existing link share if this is a duplicate
- */
- $existingShares = $this->shareManager->getSharesBy($this->currentUser, Share::SHARE_TYPE_LINK, $path, false, 1, 0);
- if (!empty($existingShares)) {
- return new DataResponse($this->formatShare($existingShares[0]));
- }
-
if ($publicUpload === 'true') {
// Check if public upload is allowed
if (!$this->shareManager->shareApiLinkAllowPublicUpload()) {