2424import org .labkey .api .exp .api .ExpProtocol ;
2525import org .labkey .api .view .HttpView ;
2626import org .labkey .api .view .JspView ;
27+ import org .labkey .vfs .FileLike ;
2728
2829import java .io .ByteArrayInputStream ;
29- import java .io .File ;
3030import java .io .IOException ;
3131import java .util .ArrayList ;
3232import java .util .Collections ;
@@ -71,7 +71,7 @@ public String getDescription(ContextType context)
7171
7272 @ NotNull
7373 @ Override
74- public Map <String , File > createData (ContextType context ) throws IOException , ExperimentException
74+ public Map <String , FileLike > createData (ContextType context ) throws IOException , ExperimentException
7575 {
7676 ExpProtocol protocol = context .getProtocol ();
7777 String data = context .getRequest ().getParameter (HaplotypeAssayProvider .DATA_PROPERTY_NAME );
@@ -95,11 +95,11 @@ public Map<String, File> createData(ContextType context) throws IOException, Exp
9595 }
9696
9797 // NOTE: We use a 'tmp' file extension so that DataLoaderService will sniff the file type by parsing the file's header.
98- File dir = getFileTargetDir (context );
99- File file = createFile (protocol , dir , "tmp" );
98+ FileLike dir = getFileTargetDir (context );
99+ FileLike file = createFile (protocol , dir , "tmp" );
100100 ByteArrayInputStream bIn = new ByteArrayInputStream (data .getBytes (context .getRequest ().getCharacterEncoding ()));
101101
102- writeFile (bIn , file );
102+ writeFile (bIn , file . toNioPathForWrite (). toFile () );
103103 return Collections .singletonMap (PRIMARY_FILE , file );
104104 }
105105
0 commit comments