Revize 77f4265e
Přidáno uživatelem Vojtěch Bartička před téměř 3 roky(ů)
Backend/Core/Services/AnnotationService/AnnotationServiceEF.cs | ||
---|---|---|
809 | 809 |
// Get documents |
810 | 810 |
var documentsToExport = context.Documents |
811 | 811 |
.Include(d => d.Content) |
812 |
.Where(d => request.DocumentIds.Contains(d.Id)); |
|
812 |
.Where(d => request.DocumentIds.Contains(d.Id)) |
|
813 |
.ToList(); |
|
813 | 814 |
|
814 | 815 |
// Get annotations |
815 | 816 |
Dictionary<Document, List<Annotation>> annotationsToExport = new(); |
Backend/Core/ZipUtils/Export.cs | ||
---|---|---|
16 | 16 |
Dictionary<Annotation, List<AnnotationTag>> annotationTags, Dictionary<FinalAnnotation, List<FinalAnnotationTag>> finalAnnotationTags) |
17 | 17 |
{ |
18 | 18 |
MemoryStream ms = new MemoryStream(); |
19 |
var archive = new ZipArchive(ms); |
|
19 |
var archive = new ZipArchive(ms, ZipArchiveMode.Create);
|
|
20 | 20 |
|
21 | 21 |
for (int docIndex = 0; docIndex < documents.Count; docIndex++) |
22 | 22 |
{ |
... | ... | |
43 | 43 |
CreateFile(documentDir + "/final.json", finalAnnotationInfoJson, archive); |
44 | 44 |
} |
45 | 45 |
|
46 |
archive.Dispose(); |
|
46 |
//archive.Dispose();
|
|
47 | 47 |
ms.Position = 0; |
48 |
|
|
49 | 48 |
return ms; |
50 | 49 |
} |
51 | 50 |
|
Také k dispozici: Unified diff
Fixed export