Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
4804:ae643f664628 | 4805:0a38000b086d |
---|---|
694 std::string job = call.GetUriComponent("id", ""); | 694 std::string job = call.GetUriComponent("id", ""); |
695 std::string key = call.GetUriComponent("key", ""); | 695 std::string key = call.GetUriComponent("key", ""); |
696 | 696 |
697 std::string value; | 697 std::string value; |
698 MimeType mime; | 698 MimeType mime; |
699 std::string filename; | |
699 | 700 |
700 if (OrthancRestApi::GetContext(call).GetJobsEngine(). | 701 if (OrthancRestApi::GetContext(call).GetJobsEngine(). |
701 GetRegistry().GetJobOutput(value, mime, job, key)) | 702 GetRegistry().GetJobOutput(value, mime, filename, job, key)) |
702 { | 703 { |
704 if (!filename.empty()) | |
705 { | |
706 call.GetOutput().SetContentFilename(filename.c_str()); | |
707 } | |
708 | |
703 call.GetOutput().AnswerBuffer(value, mime); | 709 call.GetOutput().AnswerBuffer(value, mime); |
704 } | 710 } |
705 else | 711 else |
706 { | 712 { |
707 throw OrthancException(ErrorCode_InexistentItem, | 713 throw OrthancException(ErrorCode_InexistentItem, |