From 8dcc7622433dce3c41e0f34e1a4db475487219c2 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Thu, 15 Jan 2026 09:16:25 -0800 Subject: [PATCH 1/2] GitHub Issue 436: Remove conversion of file from rowId value --- .../labkey/api/data/ExpDataFileConverter.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/api/src/org/labkey/api/data/ExpDataFileConverter.java b/api/src/org/labkey/api/data/ExpDataFileConverter.java index 159a9e4ae42..9baa56b4775 100644 --- a/api/src/org/labkey/api/data/ExpDataFileConverter.java +++ b/api/src/org/labkey/api/data/ExpDataFileConverter.java @@ -344,27 +344,27 @@ public static File convertToFile(Object value, @NotNull Container container, @No } // Value specified as simple property, so we have to guess what it might be - // First, try looking it up as a RowId - try - { - int dataRowId = Integer.parseInt(value.toString()); - ExpData data = ExperimentService.get().getExpData(dataRowId); - if (data != null) - { - File result = data.getFile(); - if (result != null) - { - return result; - } - } - } - catch (NumberFormatException ignored) - { - } +// // First, try looking it up as a RowId +// try +// { +// int dataRowId = Integer.parseInt(value.toString()); +// ExpData data = ExperimentService.get().getExpData(dataRowId); +// if (data != null) +// { +// File result = data.getFile(); +// if (result != null) +// { +// return result; +// } +// } +// } +// catch (NumberFormatException ignored) +// { +// } // toss in here an additional check, if starts with HTTP then try to use _webdav to resolve it // MAKE sure that the security is in place - figure out what container it is in - String rootSubstitutedPath = getFileRootSubstitutedFilePath(value.toString(), fileRootPath);; + String rootSubstitutedPath = getFileRootSubstitutedFilePath(value.toString(), fileRootPath); if (null != StringUtils.trimToNull(rootSubstitutedPath)) { if (assayResultFileRoot != null) From 45025d8a60676c1d5f5b81f85f945295c434be5e Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Mon, 19 Jan 2026 07:27:24 -0800 Subject: [PATCH 2/2] Add convert method with tryResolutionByRowId parameter --- .../labkey/api/data/ExpDataFileConverter.java | 50 +++++++++++-------- .../labkey/experiment/ExpDataIterators.java | 2 +- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/api/src/org/labkey/api/data/ExpDataFileConverter.java b/api/src/org/labkey/api/data/ExpDataFileConverter.java index 9baa56b4775..0bf4e45f89f 100644 --- a/api/src/org/labkey/api/data/ExpDataFileConverter.java +++ b/api/src/org/labkey/api/data/ExpDataFileConverter.java @@ -210,6 +210,11 @@ private static DataType getDataType(@NotNull File file, @NotNull Collection