Mercurial > hg > orthanc
diff OrthancServer/OrthancRestApi/OrthancRestArchive.cpp @ 1519:8bd0d897763f
refactoring: IHttpStreamAnswer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 Aug 2015 13:15:16 +0200 |
parents | f967bdf8534e |
children | f938f7779bcb |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp Tue Aug 11 10:36:05 2015 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp Tue Aug 11 13:15:16 2015 +0200 @@ -298,10 +298,10 @@ // Prepare the sending of the ZIP file FilesystemHttpSender sender(tmp.GetPath().c_str()); sender.SetContentType("application/zip"); - sender.SetDownloadFilename(id + ".zip"); + sender.SetFilename(id + ".zip"); // Send the ZIP - call.GetOutput().AnswerFile(sender); + call.GetOutput().AnswerStream(sender); // The temporary file is automatically removed thanks to the RAII } @@ -359,10 +359,10 @@ // Prepare the sending of the ZIP file FilesystemHttpSender sender(tmp.GetPath().c_str()); sender.SetContentType("application/zip"); - sender.SetDownloadFilename(id + ".zip"); + sender.SetFilename(id + ".zip"); // Send the ZIP - call.GetOutput().AnswerFile(sender); + call.GetOutput().AnswerStream(sender); // The temporary file is automatically removed thanks to the RAII }