diff options
Diffstat (limited to 'apps/files_sharing/src/services/ConfigService.js')
-rw-r--r-- | apps/files_sharing/src/services/ConfigService.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_sharing/src/services/ConfigService.js b/apps/files_sharing/src/services/ConfigService.js index e3cd6ad8d46..39062d64846 100644 --- a/apps/files_sharing/src/services/ConfigService.js +++ b/apps/files_sharing/src/services/ConfigService.js @@ -22,8 +22,14 @@ * */ +import { loadState } from '@nextcloud/initial-state' + export default class Config { + constructor() { + this._shareConfig = loadState('files_sharing', 'shareConfig', {}) + } + /** * Is public upload allowed on link shares ? * @@ -32,8 +38,7 @@ export default class Config { * @memberof Config */ get isPublicUploadEnabled() { - return document.getElementsByClassName('files-filestable')[0] - && document.getElementsByClassName('files-filestable')[0].dataset.allowPublicUpload === 'yes' + return this._shareConfig.allowPublicUploads } /** |