Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancWebDav.cpp @ 4627:f7d5372b59b3 db-changes
handling revisions of attachments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 20 Apr 2021 15:11:59 +0200 |
parents | 95ffe3b6ef7c |
children | 569d9ef165b1 |
comparison
equal
deleted
inserted
replaced
4626:686f189a903d | 4627:f7d5372b59b3 |
---|---|
151 std::unique_ptr<Resource> resource; | 151 std::unique_ptr<Resource> resource; |
152 | 152 |
153 if (level_ == ResourceType_Instance) | 153 if (level_ == ResourceType_Instance) |
154 { | 154 { |
155 FileInfo info; | 155 FileInfo info; |
156 if (context_.GetIndex().LookupAttachment(info, publicId, FileContentType_Dicom)) | 156 int64_t revision; // Ignored |
157 if (context_.GetIndex().LookupAttachment(info, revision, publicId, FileContentType_Dicom)) | |
157 { | 158 { |
158 std::unique_ptr<File> f(new File(s + ".dcm")); | 159 std::unique_ptr<File> f(new File(s + ".dcm")); |
159 f->SetMimeType(MimeType_Dicom); | 160 f->SetMimeType(MimeType_Dicom); |
160 f->SetContentLength(info.GetUncompressedSize()); | 161 f->SetContentLength(info.GetUncompressedSize()); |
161 resource.reset(f.release()); | 162 resource.reset(f.release()); |
506 { | 507 { |
507 boost::posix_time::ptime time; | 508 boost::posix_time::ptime time; |
508 LookupTime(time, context_, *it, ResourceType_Instance, MetadataType_Instance_ReceptionDate); | 509 LookupTime(time, context_, *it, ResourceType_Instance, MetadataType_Instance_ReceptionDate); |
509 | 510 |
510 FileInfo info; | 511 FileInfo info; |
511 if (context_.GetIndex().LookupAttachment(info, *it, FileContentType_Dicom)) | 512 int64_t revision; // Ignored |
513 if (context_.GetIndex().LookupAttachment(info, revision, *it, FileContentType_Dicom)) | |
512 { | 514 { |
513 std::unique_ptr<File> resource(new File(*it + ".dcm")); | 515 std::unique_ptr<File> resource(new File(*it + ".dcm")); |
514 resource->SetMimeType(MimeType_Dicom); | 516 resource->SetMimeType(MimeType_Dicom); |
515 resource->SetContentLength(info.GetUncompressedSize()); | 517 resource->SetContentLength(info.GetUncompressedSize()); |
516 resource->SetCreationTime(time); | 518 resource->SetCreationTime(time); |