comparison 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
comparison
equal deleted inserted replaced
1518:eb46cc06389a 1519:8bd0d897763f
296 } 296 }
297 297
298 // Prepare the sending of the ZIP file 298 // Prepare the sending of the ZIP file
299 FilesystemHttpSender sender(tmp.GetPath().c_str()); 299 FilesystemHttpSender sender(tmp.GetPath().c_str());
300 sender.SetContentType("application/zip"); 300 sender.SetContentType("application/zip");
301 sender.SetDownloadFilename(id + ".zip"); 301 sender.SetFilename(id + ".zip");
302 302
303 // Send the ZIP 303 // Send the ZIP
304 call.GetOutput().AnswerFile(sender); 304 call.GetOutput().AnswerStream(sender);
305 305
306 // The temporary file is automatically removed thanks to the RAII 306 // The temporary file is automatically removed thanks to the RAII
307 } 307 }
308 308
309 309
357 } 357 }
358 358
359 // Prepare the sending of the ZIP file 359 // Prepare the sending of the ZIP file
360 FilesystemHttpSender sender(tmp.GetPath().c_str()); 360 FilesystemHttpSender sender(tmp.GetPath().c_str());
361 sender.SetContentType("application/zip"); 361 sender.SetContentType("application/zip");
362 sender.SetDownloadFilename(id + ".zip"); 362 sender.SetFilename(id + ".zip");
363 363
364 // Send the ZIP 364 // Send the ZIP
365 call.GetOutput().AnswerFile(sender); 365 call.GetOutput().AnswerStream(sender);
366 366
367 // The temporary file is automatically removed thanks to the RAII 367 // The temporary file is automatically removed thanks to the RAII
368 } 368 }
369 369
370 370