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 @@ +