create default rex files with static keys
This commit is contained in:
@ -38,7 +38,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<select id="folder" class="form-control" @bind="@_folderId">
|
||||
<option value="-1"><@Localizer["Select Folder"]></option>
|
||||
<option value="-1"><@Localizer["Folder.Select"]></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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user