diff OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp @ 4153:a4664f169cd7

"/peers/{id}/store": New option "Compress" to compress DICOM data using gzip
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 23 Aug 2020 12:13:27 +0200
parents 05b8fd21089c
children d962a2996637
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp	Wed Aug 19 15:22:03 2020 +0200
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp	Sun Aug 23 12:13:27 2020 +0200
@@ -1143,6 +1143,13 @@
     {
       job->SetTranscode(SerializationToolbox::ReadString(request, TRANSCODE));
     }
+
+    static const char* COMPRESS = "Compress";
+    if (request.type() == Json::objectValue &&
+        request.isMember(COMPRESS))
+    {
+      job->SetCompress(SerializationToolbox::ReadBoolean(request, COMPRESS));
+    }
     
     {
       OrthancConfiguration::ReaderLock lock;