ManageDocuments.razorVersion:
1.0.0
Dependencies
Services:AdminSettingsService, UserService, SermonCollectionService, GroupService, DocumentStorageService, Snackbar
Variables
| Variable Name | Type | Description |
|---|---|---|
_uploadPermissionsGroupId | string | The Guid of the general upload permissions group, retrieved from AdminSettings |
_userInUploadPermissionsGroup | bool | Indicates whether current user has general upload permissions |
_uploadCollection | string | The IndexIdentifier of the sermon collection selected for uploading files |
_dragClass | string | The class applied when dragging & dropping a file |
_fileNames | List<string> | A list of the drag & dropped files’ names |
_fileUpload | MudFileUpload<IReadOnlyList<IBrowserFile>>? | A representation of the MudFileUpload element that handles uploading files |
_filesToUpload | List<IBrowserFile> | A list of IBrowserFile, each of which will need to be opened in a read stream & uploaded to Azure storage |
_sermonCollectionsUploadAccess | IEnumerable<SermonCollection> | The sermon collections that are available for uploading files |
Lifecycle Methods
Runtime Methods
ClearAsync()
Clears the selected files from the upload box.OpenFilePickerAsync()
Opens the local computer’s file picker.OnInputFileChanged(InputFileChangeEventArgs)
Sets _fileNames and _filesToUpload when selected files change.
Upload()
Opens a read stream for each file in_filesToUpload and calls DocumentStorageService.UploadBlobAsync to upload them to Azure Storage in the container associated with _uploadCollection.
SetDragClass()
Sets_dragClass to include a border.
ClearDragClass()
Sets_dragClass to default.
