comparison OrthancServer/ServerContext.cpp @ 320:1b0ffed55ab0

fix download dicom
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 03 Jan 2013 14:41:12 +0100
parents 4eea080e6e7a
children 2cef9c2d4148
comparison
equal deleted inserted replaced
319:760d0f32cb34 320:1b0ffed55ab0
134 { 134 {
135 throw OrthancException(ErrorCode_InternalError); 135 throw OrthancException(ErrorCode_InternalError);
136 } 136 }
137 137
138 accessor_.SetCompressionForNextOperations(attachment.GetCompressionType()); 138 accessor_.SetCompressionForNextOperations(attachment.GetCompressionType());
139
139 std::auto_ptr<HttpFileSender> sender(accessor_.ConstructHttpFileSender(attachment.GetUuid())); 140 std::auto_ptr<HttpFileSender> sender(accessor_.ConstructHttpFileSender(attachment.GetUuid()));
141 sender->SetContentType("application/dicom");
142 sender->SetDownloadFilename(instancePublicId + ".dcm");
140 output.AnswerFile(*sender); 143 output.AnswerFile(*sender);
141 } 144 }
142 145
143 146
144 void ServerContext::ReadJson(Json::Value& result, 147 void ServerContext::ReadJson(Json::Value& result,