From eaa9fcbe7b6fd4532d7bb88b260e61b409e665df Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Fri, 17 Apr 2020 16:28:25 -0700 Subject: [PATCH] Fix file transfer progress bar. --- Server/API/FileSharingController.cs | 5 +++-- Server/Pages/RemoteControl.cshtml | 8 ++++---- Server/Services/DataService.cs | 6 +++--- Server/wwwroot/css/remote-control.css | 11 +++++++++++ Server/wwwroot/scripts/RemoteControl/UI.js | 4 ++-- Server/wwwroot/scripts/RemoteControl/UI.js.map | 2 +- Server/wwwroot/scripts/RemoteControl/UI.ts | 5 +++-- 7 files changed, 27 insertions(+), 14 deletions(-) diff --git a/Server/API/FileSharingController.cs b/Server/API/FileSharingController.cs index e8a6e12f..c505f06a 100644 --- a/Server/API/FileSharingController.cs +++ b/Server/API/FileSharingController.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Remotely.Server.Services; using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 @@ -31,13 +32,13 @@ namespace Remotely.Server.API [HttpPost] [RequestSizeLimit(500_000_000)] - public List Post() + public async Task> Post() { var fileIDs = new List(); foreach (var file in Request.Form.Files) { var orgID = User.Identity.IsAuthenticated ? DataService.GetUserByName(User.Identity.Name).OrganizationID : null; - var id = DataService.AddSharedFile(file, orgID); + var id = await DataService.AddSharedFile(file, orgID); fileIDs.Add(id); } return fileIDs; diff --git a/Server/Pages/RemoteControl.cshtml b/Server/Pages/RemoteControl.cshtml index b1ef2aa0..42980e84 100644 --- a/Server/Pages/RemoteControl.cshtml +++ b/Server/Pages/RemoteControl.cshtml @@ -182,14 +182,14 @@ +