private async Task SetPreviewForRecord(RecordModel record, SaveFileResponseModel response) { var recordFromSavedFile = MapToRecord(response, ""); record.Preview = recordFromSavedFile.File; await _recordComponent.Update(record); }
private async Task AddRecord(SaveFileResponseModel response, FileModel file) { var record = MapToRecord(response, file); record.TrySetPreview(); await _recordComponent.AddDefault(record); await SubmitPreviewGenerationIfNeeded(record); }
private RecordModel MapToRecord(SaveFileResponseModel response, string fileName) { return(new RecordModel { Id = Guid.NewGuid().ToString(), FileName = fileName, File = new RecordFileModel { Id = Guid.NewGuid().ToString(), FileStoreSchema = response.FileStoreSchema, RelativePath = response.RelativePath } }); }
private RecordModel MapToRecord(SaveFileResponseModel response, FileModel file) { return(MapToRecord(response, file.FileName)); }