Ejemplo n.º 1
0
        public async Task <IActionResult> PostContactDataAsync()
        {
            using (var memoryStream = new MemoryStream())
            {
                await Request.StreamFile(memoryStream);

                memoryStream.Seek(0, SeekOrigin.Begin);

                using (var streamReder = new StreamReader(memoryStream))
                {
                    var userId = this.GetCurrentUserId();
                    await _dataImportService.ImportContactsAsync(streamReder, userId);
                }
            }

            return(Ok());
        }