public async Task <SimsAttachmentFileInfo> AddAttachment(string filePath, string filename, int hostId)
        {
            var signalLibrary = AppExtensions.GenerateSignalsId(hostId);
            var item          = await attachments.AddAttachment(filePath, filename, signalLibrary);

            return(await dbHost.Incidents.Attachments.Add(hostId, item.url));
        }
        public async Task <SimsAttachmentFileInfo> AddAttachment(string filePath, string filename, int hostId)
        {
            if (!await this.dbHost.Incidents.IsClosed(hostId))
            {
                var incidentLibrary = AppExtensions.GenerateIncidentId(hostId);
                var item            = await attachments.AddAttachment(filePath, filename, incidentLibrary);

                return(await dbHost.Incidents.Attachments.Add(hostId, item.url));
            }
            else
            {
                throw new SimsIncidentClosedException("Incident closed, cannot upload attachment");
            }
        }