diff --git a/laboratory/src/org/labkey/laboratory/LaboratoryController.java b/laboratory/src/org/labkey/laboratory/LaboratoryController.java index 98ef9ea9..4a1d8538 100644 --- a/laboratory/src/org/labkey/laboratory/LaboratoryController.java +++ b/laboratory/src/org/labkey/laboratory/LaboratoryController.java @@ -615,7 +615,7 @@ protected void setContentType(HttpServletResponse response) } @Override - protected File getTargetFile(String filename) throws IOException + protected FileLike getTargetFile(String filename) throws IOException { if (!PipelineService.get().hasValidPipelineRoot(getContainer())) throw new UploadException("Pipeline root must be configured before uploading assay files", HttpServletResponse.SC_NOT_FOUND); @@ -623,7 +623,7 @@ protected File getTargetFile(String filename) throws IOException try { FileLike targetDirectory = AssayFileWriter.ensureUploadDirectory(getContainer()); - return FileUtil.findUniqueFileName(filename, targetDirectory).toNioPathForWrite().toFile(); + return FileUtil.findUniqueFileName(filename, targetDirectory); } catch (ExperimentException e) { @@ -632,14 +632,14 @@ protected File getTargetFile(String filename) throws IOException } @Override - public String getResponse(ProcessAssayForm form, Map> files) throws UploadException + public String getResponse(ProcessAssayForm form, Map> files) throws UploadException { JSONObject resp = new JSONObject(); try { - for (Map.Entry> entry : files.entrySet()) + for (Map.Entry> entry : files.entrySet()) { - File file = entry.getValue().getKey(); + File file = entry.getValue().getKey().toNioPathForRead().toFile(); String originalName = entry.getValue().getValue(); if (form.getLabkeyAssayId() == null)