mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
Importer quickfix for tests
This commit is contained in:
1 parent
413b1931f9
commit
28cd6ae3df
1 file changed
+15
+15
@@ -117,6 +117,21 @@ public class SensorDataImportServlet extends AbstractFileUploadServlet {
|
||||
throws IOException {
|
||||
List<Pair<String, InputStream>> files = new ArrayList<>();
|
||||
|
||||
String importerName = null;
|
||||
searchForPrefferedImporter: for (FileItem fi : fileItems) {
|
||||
if ("preferredImporter".equalsIgnoreCase(fi.getFieldName())) {
|
||||
importerName = fi.getString();
|
||||
break searchForPrefferedImporter;
|
||||
}
|
||||
}
|
||||
if (importerName == null) {
|
||||
importerName = "BRAVO";
|
||||
}
|
||||
for (FileItem fi : fileItems) {
|
||||
if ("file".equalsIgnoreCase(fi.getFieldName())) {
|
||||
files.add(new Pair<>(importerName, fi.getInputStream()));
|
||||
}
|
||||
}
|
||||
final Iterable<TrackFileImportDeviceIdentifier> mappingList = importFiles(files);
|
||||
resp.setContentType("text/html");
|
||||
for (TrackFileImportDeviceIdentifier mapping : mappingList) {
|
||||
|
||||
Reference in new issue
Block a user