aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/mixins/ShareRequests.js
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-08-01 09:44:31 +0200
committerGitHub <noreply@github.com>2022-08-01 09:44:31 +0200
commitf74e89bde5892a68500eeea3fa98a511b1d7f7e9 (patch)
treea152cdabfedf9caf21483b5dfb9e3f2574cc3ca5 /apps/files_sharing/src/mixins/ShareRequests.js
parent952acd4d276b3190d23e0597c5e01b1dfc4d72bc (diff)
parent7b723813cef60e744ab14ab418c82e5ec67a9f2e (diff)
downloadnextcloud-server-f74e89bde5892a68500eeea3fa98a511b1d7f7e9.tar.gz
nextcloud-server-f74e89bde5892a68500eeea3fa98a511b1d7f7e9.zip
Merge pull request #32482 from nextcloud/enh/noid/share-attributes
Add share attributes + prevent download permission
Diffstat (limited to 'apps/files_sharing/src/mixins/ShareRequests.js')
-rw-r--r--apps/files_sharing/src/mixins/ShareRequests.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/src/mixins/ShareRequests.js b/apps/files_sharing/src/mixins/ShareRequests.js
index e2668c15d65..9eaad8c4161 100644
--- a/apps/files_sharing/src/mixins/ShareRequests.js
+++ b/apps/files_sharing/src/mixins/ShareRequests.js
@@ -47,12 +47,13 @@ export default {
* @param {boolean} [data.sendPasswordByTalk=false] send the password via a talk conversation
* @param {string} [data.expireDate=''] expire the shareautomatically after
* @param {string} [data.label=''] custom label
+ * @param {string} [data.attributes=null] Share attributes encoded as json
* @return {Share} the new share
* @throws {Error}
*/
- async createShare({ path, permissions, shareType, shareWith, publicUpload, password, sendPasswordByTalk, expireDate, label }) {
+ async createShare({ path, permissions, shareType, shareWith, publicUpload, password, sendPasswordByTalk, expireDate, label, attributes }) {
try {
- const request = await axios.post(shareUrl, { path, permissions, shareType, shareWith, publicUpload, password, sendPasswordByTalk, expireDate, label })
+ const request = await axios.post(shareUrl, { path, permissions, shareType, shareWith, publicUpload, password, sendPasswordByTalk, expireDate, label, attributes })
if (!request?.data?.ocs) {
throw request
}