This commit is contained in:
Marco Audiffredi 2024-02-26 16:15:20 +01:00
parent dacd064324
commit dcb0322a8a
4 changed files with 13 additions and 2 deletions

View File

@ -47,6 +47,15 @@ namespace VirtualTask.Controllers
return View();
}
public FileResult Download(string file)
{
string app = "";
byte[] fileBytes = System.IO.File.ReadAllBytes(file);
var response = new FileContentResult(fileBytes, "application/octet-stream");
response.FileDownloadName = "appTest.apk";
return response;
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()

View File

@ -4,4 +4,6 @@
}
<h1>@ViewData["Title"]</h1>
<p>Pagina in definizione</p>
<p> <a href="Download?file=wwwroot/APP/app-env_polo_1_20.apk" target="_blank">Download Android App</a> </p>

View File

@ -224,7 +224,7 @@ Purchase:
<p>
Per la gestione degli interventi e il rilascio del buono in modo semplice ed intuitivo
</p>
<a href="@Url.Action("VT_Read", "Home")" class="agy-btn">Leggi Altro</a>
<a href="@Url.Action("VT_Read", "Home")" class="agy-btn">Download APP test</a>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-12">

Binary file not shown.