Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancWebDav.cpp @ 4241:3510da0e260c
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 09 Oct 2020 12:07:23 +0200 |
parents | 799c0c527ced |
children | 5cfa6ba75dfc |
comparison
equal
deleted
inserted
replaced
4240:799c0c527ced | 4241:3510da0e260c |
---|---|
43 #include <boost/algorithm/string/predicate.hpp> | 43 #include <boost/algorithm/string/predicate.hpp> |
44 | 44 |
45 | 45 |
46 static const char* const BY_PATIENTS = "by-patients"; | 46 static const char* const BY_PATIENTS = "by-patients"; |
47 static const char* const BY_STUDIES = "by-studies"; | 47 static const char* const BY_STUDIES = "by-studies"; |
48 static const char* const BY_DATE = "by-dates"; | 48 static const char* const BY_DATES = "by-dates"; |
49 static const char* const BY_UIDS = "by-uids"; | 49 static const char* const BY_UIDS = "by-uids"; |
50 static const char* const UPLOADS = "uploads"; | 50 static const char* const UPLOADS = "uploads"; |
51 static const char* const MAIN_DICOM_TAGS = "MainDicomTags"; | 51 static const char* const MAIN_DICOM_TAGS = "MainDicomTags"; |
52 | 52 |
53 | 53 |
1185 else if (path[0] == BY_STUDIES) | 1185 else if (path[0] == BY_STUDIES) |
1186 { | 1186 { |
1187 IWebDavBucket::Collection tmp; | 1187 IWebDavBucket::Collection tmp; |
1188 return studies_->ListCollection(tmp, UriComponents(path.begin() + 1, path.end())); | 1188 return studies_->ListCollection(tmp, UriComponents(path.begin() + 1, path.end())); |
1189 } | 1189 } |
1190 else if (path[0] == BY_DATE) | 1190 else if (path[0] == BY_DATES) |
1191 { | 1191 { |
1192 IWebDavBucket::Collection tmp; | 1192 IWebDavBucket::Collection tmp; |
1193 return dates_->ListCollection(tmp, UriComponents(path.begin() + 1, path.end())); | 1193 return dates_->ListCollection(tmp, UriComponents(path.begin() + 1, path.end())); |
1194 } | 1194 } |
1195 else if (path[0] == UPLOADS) | 1195 else if (path[0] == UPLOADS) |
1206 bool OrthancWebDav::ListCollection(Collection& collection, | 1206 bool OrthancWebDav::ListCollection(Collection& collection, |
1207 const UriComponents& path) | 1207 const UriComponents& path) |
1208 { | 1208 { |
1209 if (path.empty()) | 1209 if (path.empty()) |
1210 { | 1210 { |
1211 collection.AddResource(new Folder(BY_DATE)); | 1211 collection.AddResource(new Folder(BY_DATES)); |
1212 collection.AddResource(new Folder(BY_PATIENTS)); | 1212 collection.AddResource(new Folder(BY_PATIENTS)); |
1213 collection.AddResource(new Folder(BY_STUDIES)); | 1213 collection.AddResource(new Folder(BY_STUDIES)); |
1214 collection.AddResource(new Folder(BY_UIDS)); | 1214 collection.AddResource(new Folder(BY_UIDS)); |
1215 collection.AddResource(new Folder(UPLOADS)); | 1215 collection.AddResource(new Folder(UPLOADS)); |
1216 return true; | 1216 return true; |
1260 } | 1260 } |
1261 else if (path[0] == BY_STUDIES) | 1261 else if (path[0] == BY_STUDIES) |
1262 { | 1262 { |
1263 return studies_->ListCollection(collection, UriComponents(path.begin() + 1, path.end())); | 1263 return studies_->ListCollection(collection, UriComponents(path.begin() + 1, path.end())); |
1264 } | 1264 } |
1265 else if (path[0] == BY_DATE) | 1265 else if (path[0] == BY_DATES) |
1266 { | 1266 { |
1267 return dates_->ListCollection(collection, UriComponents(path.begin() + 1, path.end())); | 1267 return dates_->ListCollection(collection, UriComponents(path.begin() + 1, path.end())); |
1268 } | 1268 } |
1269 else if (path[0] == UPLOADS) | 1269 else if (path[0] == UPLOADS) |
1270 { | 1270 { |
1347 } | 1347 } |
1348 else if (path[0] == BY_STUDIES) | 1348 else if (path[0] == BY_STUDIES) |
1349 { | 1349 { |
1350 return studies_->GetFileContent(mime, content, modificationTime, UriComponents(path.begin() + 1, path.end())); | 1350 return studies_->GetFileContent(mime, content, modificationTime, UriComponents(path.begin() + 1, path.end())); |
1351 } | 1351 } |
1352 else if (path[0] == BY_DATES) | |
1353 { | |
1354 return dates_->GetFileContent(mime, content, modificationTime, UriComponents(path.begin() + 1, path.end())); | |
1355 } | |
1352 else if (path[0] == UPLOADS) | 1356 else if (path[0] == UPLOADS) |
1353 { | 1357 { |
1354 return uploads_.GetFileContent(mime, content, modificationTime, UriComponents(path.begin() + 1, path.end())); | 1358 return uploads_.GetFileContent(mime, content, modificationTime, UriComponents(path.begin() + 1, path.end())); |
1355 } | 1359 } |
1356 else | 1360 else |