Esempio n. 1
0
        private async Task SetPreviewForRecord(RecordModel record, SaveFileResponseModel response)
        {
            var recordFromSavedFile = MapToRecord(response, "");

            record.Preview = recordFromSavedFile.File;
            await _recordComponent.Update(record);
        }
Esempio n. 2
0
        private async Task AddRecord(SaveFileResponseModel response, FileModel file)
        {
            var record = MapToRecord(response, file);

            record.TrySetPreview();
            await _recordComponent.AddDefault(record);

            await SubmitPreviewGenerationIfNeeded(record);
        }
Esempio n. 3
0
 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
         }
     });
 }
Esempio n. 4
0
 private RecordModel MapToRecord(SaveFileResponseModel response, FileModel file)
 {
     return(MapToRecord(response, file.FileName));
 }