public async Task <InvokeResult <MediaResource> > AddDeviceImage(string devicerepoid, string deviceid, [FromForm] IFormFile file) { using (var strm = file.OpenReadStream()) { var repo = await _repoManager.GetDeviceRepositoryWithSecretsAsync(devicerepoid, OrgEntityHeader, UserEntityHeader); return(await _deviceManager.AddDeviceImageAsync(repo, deviceid, strm, file.FileName, file.ContentType, OrgEntityHeader, UserEntityHeader)); } }