Mercurial > hg > orthanc
diff OrthancServer/ServerContext.cpp @ 1523:c388502a066d
testing FilesystemHttpSender
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 Aug 2015 16:09:00 +0200 |
parents | f938f7779bcb |
children | f9b0169eb6bb |
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp Tue Aug 11 15:37:42 2015 +0200 +++ b/OrthancServer/ServerContext.cpp Tue Aug 11 16:09:00 2015 +0200 @@ -313,12 +313,22 @@ throw OrthancException(ErrorCode_InternalError); } +#if 1 accessor_.SetCompressionForNextOperations(attachment.GetCompressionType()); std::auto_ptr<HttpFileSender> sender(accessor_.ConstructHttpFileSender(attachment.GetUuid(), attachment.GetContentType())); sender->SetContentType(GetMimeType(content)); - sender->SetContentFilename(instancePublicId + ".dcm"); + sender->SetContentFilename(instancePublicId + ".dcm"); // TODO ".dcm" => ToMimeType(content) output.AnswerStream(*sender); +#else + const FilesystemStorage& a = dynamic_cast<FilesystemStorage&>(accessor_.GetStorageArea()); + + FilesystemHttpSender sender(a, attachment.GetUuid()); + sender.SetSourceCompression(attachment.GetCompressionType()); + sender.SetContentType(GetMimeType(content)); + sender.SetContentFilename(instancePublicId + ".dcm"); + output.AnswerStream(sender); +#endif }