Mercurial > hg > orthanc
diff OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp @ 4805:0a38000b086d
Archive jobs response now contains a header Content-Disposition:filename='archive.zip'
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 09 Nov 2021 09:51:14 +0100 |
parents | 7826ac059c31 |
children | 70d2a97ca8cb 7053502fbf97 |
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Thu Oct 28 13:05:56 2021 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue Nov 09 09:51:14 2021 +0100 @@ -696,10 +696,16 @@ std::string value; MimeType mime; + std::string filename; if (OrthancRestApi::GetContext(call).GetJobsEngine(). - GetRegistry().GetJobOutput(value, mime, job, key)) + GetRegistry().GetJobOutput(value, mime, filename, job, key)) { + if (!filename.empty()) + { + call.GetOutput().SetContentFilename(filename.c_str()); + } + call.GetOutput().AnswerBuffer(value, mime); } else