From 6ef0da2d17283f5703059db31afbdf005651d302 Mon Sep 17 00:00:00 2001 From: Volodymyr Zotov Date: Thu, 10 Jul 2025 14:03:57 -0500 Subject: [PATCH] Add file from document --- pkg/onepassword/model/item.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/onepassword/model/item.go b/pkg/onepassword/model/item.go index ebf13e4..9f4af44 100644 --- a/pkg/onepassword/model/item.go +++ b/pkg/onepassword/model/item.go @@ -70,6 +70,15 @@ func (i *Item) FromSDKItem(item *sdk.Item) { }) } + // Items of 'Document' category keeps file information in the Document field. + if item.Category == sdk.ItemCategoryDocument { + i.Files = append(i.Files, File{ + ID: item.Document.ID, + Name: item.Document.Name, + Size: int(item.Document.Size), + }) + } + i.CreatedAt = item.CreatedAt }