diff --git a/src/main/java/io/kestra/plugin/mongodb/Find.java b/src/main/java/io/kestra/plugin/mongodb/Find.java index 879ba0f..d84e6e7 100644 --- a/src/main/java/io/kestra/plugin/mongodb/Find.java +++ b/src/main/java/io/kestra/plugin/mongodb/Find.java @@ -152,7 +152,7 @@ public Find.Output run(RunContext runContext) throws Exception { } private Pair store(RunContext runContext, FindIterable documents) throws IOException { - File tempFile = runContext.tempFile(".ion").toFile(); + File tempFile = runContext.workingDir().createTempFile(".ion").toFile(); AtomicLong count = new AtomicLong(); try (OutputStream output = new FileOutputStream(tempFile)) {