Pulizia javascript per download file inutile e modifica costruzione link per download

This commit is contained in:
marco.salvi
2022-02-09 10:37:11 +01:00
parent f7d09c7e66
commit 86077f0217
9 changed files with 47 additions and 11 deletions
+2 -1
View File
@@ -42,5 +42,6 @@
],
"Database": 14
},
"FileShare": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\unsafe_uploads"
"FileShare": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\unsafe_uploads",
"ApiUrl": "https://liman.egalware.com/"
}
+18 -5
View File
@@ -1,4 +1,10 @@
@using LiMan.UI.Components
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
@using System.IO
@inject IJSRuntime JS
<div class="row">
<div class="@mainCss">
<div class="card">
@@ -76,8 +82,7 @@
<thead>
<tr>
<th>Nome File</th>
<th>OriginalName</th>
@*<th>FullStoragePath</th>*@
<th>FullStoragePath</th>
</tr>
</thead>
<tbody>
@@ -86,16 +91,24 @@
<tr>
<td>
@record.OriginalName<br />
@*<button @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</button>*@
<a href="@(Configuration["ApiUrl"]+"/ELM.API/api/filesave/"+@record.FullStoragePath+"/"+@record.OriginalName)" target="_blank">@record.OriginalName</a>
@*<a @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</a>*@
</td>
@*<td>
<td>
<div>@record.FullStoragePath</div>
</td>*@
</td>
</tr>
}
</tbody>
</table>
@* <button @onclick="DownloadFileFromURL">
Download File From URL
</button>*@
</div>
</div>
}
+10
View File
@@ -122,6 +122,16 @@ namespace LiMan.UI.Components
isLoading = false;
}
//private async void DownloadFileFromURL(string fileName, string rawUrl)
//{
// rawUrl = rawUrl.Replace("\\", "/");
// var fileURL = $"unsafe_uploads/"+rawUrl;
// //var fileName = "log-0001.txt";
// //var fileName = FileAttached;
// await JS.InvokeVoidAsync("triggerFileDownload", fileName, fileURL);
//}
#endregion Private Methods
#region Protected Methods
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Version>1.1.2202.0710</Version>
<Version>1.1.2202.0910</Version>
<RootNamespace>LiMan.UI</RootNamespace>
<AssemblyName>LiMan.UI</AssemblyName>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>License Manager</i>
<h4>Versione: 1.1.2202.0710</h4>
<h4>Versione: 1.1.2202.0910</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
1.1.2202.0710
1.1.2202.0910
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.1.2202.0710</version>
<version>1.1.2202.0910</version>
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+11
View File
@@ -15,6 +15,8 @@ using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.Extensions.FileProviders;
using Microsoft.AspNetCore.Http;
namespace LiMan.UI
{
@@ -72,6 +74,15 @@ namespace LiMan.UI
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseFileServer(new FileServerOptions
{
FileProvider = new PhysicalFileProvider(@"\\stor01\TEAM DRIVES\40_FileUpload\unsafe_uploads"),
RequestPath = new PathString("/unsafe_uploads"),
EnableDirectoryBrowsing = true
//EnableDirectoryBrowsing = false
});
app.UseRouting();
app.UseEndpoints(endpoints =>
+2 -1
View File
@@ -28,5 +28,6 @@
"MailDest": {
"Admin": "samuele@steamware.net",
"ProcOp": "ceo@steamware.net"
}
},
"ApiUrl": "https://liman.egalware.com"
}