Skip to content

Commit

Permalink
Fix queries
Browse files Browse the repository at this point in the history
  • Loading branch information
nihalbhatnagar committed Jan 6, 2025
1 parent 33c2ff9 commit 385a3de
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/client/src/util/toDataValueQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ export async function toDataValueQueries(
return attachment.rid;
}

if (
typeof value === "object" && value instanceof Blob && "name" in value
) {
const attachment = await OntologiesV2.Attachments.upload(
client,
value,
{
filename: value.name as string,
},
);
return attachment.rid;
}

// If it's not an upload, it's just an attachment rid string which we can pass through
return value;
}
Expand Down

0 comments on commit 385a3de

Please sign in to comment.