create default rex files with static keys

This commit is contained in:
Grayson Walker
2021-06-18 14:45:38 -04:00
parent 216dd39474
commit ae0edcfd2d
133 changed files with 12555 additions and 352 deletions

View File

@ -38,7 +38,7 @@
</td>
<td>
<select id="folder" class="form-control" @bind="@_folderId">
<option value="-1">&lt;@Localizer["Select Folder"]&gt;</option>
<option value="-1">&lt;@Localizer["Folder.Select"]&gt;</option>
@foreach (Folder folder in _folders)
{
<option value="@(folder.FolderId)">@(new string('-', folder.Level * 2))@(folder.Name)</option>
@ -74,7 +74,7 @@
{
if (url == string.Empty || _folderId == -1)
{
AddModuleMessage(Localizer["You Must Enter A Url And Select A Folder"], MessageType.Warning);
AddModuleMessage(Localizer["Message.Required.UrlFolder"], MessageType.Warning);
return;
}
@ -83,13 +83,13 @@
if (!Constants.UploadableFiles.Split(',')
.Contains(Path.GetExtension(filename).ToLower().Replace(".", "")))
{
AddModuleMessage(Localizer["File Could Not Be Downloaded From Url Due To Its File Extension"], MessageType.Warning);
AddModuleMessage(Localizer["Message.Download.InvalidExtension"], MessageType.Warning);
return;
}
if (!filename.IsPathOrFileValid())
{
AddModuleMessage(Localizer["You Must Enter A Url With A Valid File Name"], MessageType.Warning);
AddModuleMessage(Localizer["Message.Required.UrlName"], MessageType.Warning);
return;
}
@ -97,12 +97,12 @@
{
await FileService.UploadFileAsync(url, _folderId);
await logger.LogInformation("File Downloaded Successfully From Url {Url}", url);
AddModuleMessage(Localizer["File Downloaded Successfully From Url"], MessageType.Success);
AddModuleMessage(Localizer["Success.Download.File"], MessageType.Success);
}
catch (Exception ex)
{
await logger.LogError(ex, "Error Downloading File From Url {Url} {Error}", url, ex.Message);
AddModuleMessage(Localizer["Error Downloading File From Url. Please Verify That The Url Is Valid."], MessageType.Error);
AddModuleMessage(Localizer["Error.Download.InvalidUrl"], MessageType.Error);
}
}
}