From 84d1bbf2d511d84761865ad929e5a47cd9b62d50 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 4 Sep 2024 15:14:44 +0200 Subject: [PATCH] add comment --- libs/template/file.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/template/file.go b/libs/template/file.go index 7293ed0ac3..826ded376e 100644 --- a/libs/template/file.go +++ b/libs/template/file.go @@ -76,6 +76,9 @@ func (f *copyFile) PersistToDisk() error { } defer srcFile.Close() + // we read the full file into memory because we need to inspect the content + // in order to determine if it is a notebook + // Once we stop using the workspace API, we can remove this and write in a streaming fashion content, err := io.ReadAll(srcFile) if err != nil { return err