Mercurial > hg > orthanc
diff OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp @ 5048:22966345eaba
skip StorageCache when verifying md5 or when re-compressing attachments
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 29 Jun 2022 13:15:20 +0200 |
parents | e25689b5f0a3 |
children | 255b02c68908 |
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Wed Jun 29 09:43:35 2022 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Wed Jun 29 13:15:20 2022 +0200 @@ -2132,7 +2132,7 @@ // Return the raw data (possibly compressed), as stored on the filesystem std::string content; int64_t revision; - context.ReadAttachment(content, revision, publicId, type, false); + context.ReadAttachment(content, revision, publicId, type, false, true /* skipCache when you absolutely need the compressed data */); int64_t userRevision; std::string userMD5; @@ -2314,7 +2314,7 @@ // First check whether the compressed data is correctly stored in the disk std::string data; - context.ReadAttachment(data, revision, publicId, StringToContentType(name), false); + context.ReadAttachment(data, revision, publicId, StringToContentType(name), false, true /* skipCache when you absolutely need the compressed data */); std::string actualMD5; Toolbox::ComputeMD5(actualMD5, data); @@ -2329,7 +2329,7 @@ } else { - context.ReadAttachment(data, revision, publicId, StringToContentType(name), true); + context.ReadAttachment(data, revision, publicId, StringToContentType(name), true, true /* skipCache when you absolutely need the compressed data */); Toolbox::ComputeMD5(actualMD5, data); ok = (actualMD5 == info.GetUncompressedMD5()); }