comparison OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp @ 4765:71fbdee4b832

Fix upload of ZIP archives containing a DICOMDIR file
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 13 Aug 2021 17:41:09 +0200
parents d16c3c7f11ef
children 61da49321754 94616af363ec
comparison
equal deleted inserted replaced
4764:cc02a2aa8bab 4765:71fbdee4b832
209 { 209 {
210 if (e.GetErrorCode() == ErrorCode_BadFileFormat) 210 if (e.GetErrorCode() == ErrorCode_BadFileFormat)
211 { 211 {
212 LOG(ERROR) << "Cannot import non-DICOM file from ZIP archive: " << filename; 212 LOG(ERROR) << "Cannot import non-DICOM file from ZIP archive: " << filename;
213 } 213 }
214 else if (e.GetErrorCode() == ErrorCode_InexistentTag)
215 {
216 /**
217 * Allow upload of ZIP archives containing a DICOMDIR
218 * file (new in Orthanc 1.9.7):
219 * https://groups.google.com/g/orthanc-users/c/sgBU89o4nhU/m/kbRAYiQUAAAJ
220 **/
221 LOG(ERROR) << "Ignoring what is probably a DICOMDIR file within a ZIP archive: \"" << filename << "\"";
222 }
214 else 223 else
215 { 224 {
216 throw; 225 throw;
217 } 226 }
218 } 227 }