Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @{
- ViewData["Title"] = "Home Page";
- }
- @model IEnumerable<MyCloud.Models.FileData>
- @if (User.Identity.IsAuthenticated)
- {
- <form asp-action="UploadFile" asp-controller="Home" method="post" enctype="multipart/form-data">
- <input type="file" name="uploadedFile" /><br>
- <input type="submit" value="Загрузить" />
- </form>
- <table class="table">
- <tr><th>Имя файла</th><th>Размер файла</th><th>Дата загрузки</th><th>Действия</th></tr>
- @foreach (var item in Model)
- {
- <tr>
- <td>@item.FileName</td>
- <td>@item.Weight</td>
- <td>@item.CreateDate</td>
- <td>
- <a asp-action="DownloadFile" asp-controller="Home" method="get" asp-route-filename="@item.FileName">Скачать</a>
- <a asp-action="DeleteFile" asp-controller="Home" method="get" asp-route-filename="@item.FileName">Удалить</a>
- </td>
- </tr>
- }
- </table>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement