File Extension management - site wide.

I have added to the site settings file extension management.
The Constants remain for backward compatibility.
If the extensions are not updated then the Constant will be used.
This commit is contained in:
Leigh Pointer
2023-12-01 21:09:33 +01:00
parent 768066db58
commit 7035f4cc1f
7 changed files with 121 additions and 44 deletions

View File

@ -77,7 +77,7 @@
<div class="row mb-1 align-items-center">
<Label Class="col-sm-3" For="@photofileid.ToString()" HelpText="A photo of yourself" ResourceKey="Photo"></Label>
<div class="col-sm-9">
<FileManager FileId="@photofileid" Filter="@Constants.ImageFiles" ShowFolders="false" ShowFiles="true" UploadMultiple="false" FolderId="@folderid" @ref="filemanager" />
<FileManager FileId="@photofileid" Filter="@_ImageFiles" ShowFolders="false" ShowFiles="true" UploadMultiple="false" FolderId="@folderid" @ref="filemanager" />
</div>
</div>
</div>
@ -311,7 +311,7 @@
private int folderid = -1;
private int photofileid = -1;
private File photo = null;
private string _ImageFiles = string.Empty;
private List<Profile> profiles;
private Dictionary<string, string> settings;
private string category = string.Empty;
@ -360,6 +360,8 @@
photofileid = -1;
photo = null;
}
var sitesettings = await SettingService.GetSiteSettingsAsync(SiteState.Alias.SiteId);
_ImageFiles = SettingService.GetSetting(settings, "ImageFiles", Constants.ImageFiles);
settings = await SettingService.GetUserSettingsAsync(PageState.User.UserId);