public async Task <JsonResult> ProcessImportFile(IEnumerable <IFormFile> files, string importedById)
        {
            if (files != null && files.Count() > 0)
            {
                AttachmentListViewModel AttachmentList = new AttachmentListViewModel();
                AttachmentList.Attachments = new List <AttachmentViewModel>();
                foreach (var file in files)
                {
                    AttachmentViewModel uploadFile = new AttachmentViewModel();
                    if (file == null)
                    {
                        return(new JsonResult(new { Status = ResponseCodes.FileUploadFailed }));
                    }
                    if (file.Length == 0)
                    {
                        return(new JsonResult(new { Status = ResponseCodes.FileUploadFailed }));
                    }
                    var extension     = Path.GetExtension(file.FileName);
                    var fileType      = GetContainerFileType(extension);
                    var containerName = GetContainerName(fileType);
                    var attachmentId  = Guid.NewGuid();
                    var Url           = await _azureBlobService.UploadFileToBlob(_appSetting.AzureBlobStorageConnectionString, containerName, file);

                    if (Url != null)
                    {
                        var attachment = new Attachment
                        {
                            Id                  = attachmentId,
                            FileName            = file.FileName,
                            Extension           = extension,
                            IsDeleted           = 0,
                            AttachmentType      = (int)fileType,
                            UserId              = importedById,
                            CreatedDateTime     = DateTime.UtcNow,
                            LastUpdatedDateTime = DateTime.UtcNow,
                            CreatedBy           = "System",
                            LastUpdatedBy       = "System",
                            Title               = file.FileName,
                            FileUrl             = Url.ToString()
                        };


                        await _dbContext.Attachments.AddAsync(attachment);

                        await _dbContext.SaveChangesAsync();

                        uploadFile.Id        = attachmentId;
                        uploadFile.Extension = extension;
                        uploadFile.Name      = file.FileName;
                        //uploadFile.title = file.FileName;
                        uploadFile.Image      = Url.ToString();
                        uploadFile.ThumbImage = Url.ToString();
                    }

                    AttachmentList.Attachments.Add(uploadFile);
                    AttachmentList.Status = ResponseCodes.FileUploadSuccess;
                }
                return(new JsonResult(AttachmentList));
            }
            return(new JsonResult(new { Status = ResponseCodes.FileUploadFailed }));
        }