Open source file-system and knowledge based agent template. Build AI agents that stay up to date with your knowledge base
fix(sources): correctly formats file data for blob storage
Hugo Richard03f614f1554c
diff --git a/apps/app/server/api/sources/[id]/files.put.ts b/apps/app/server/api/sources/[id]/files.put.tsindex 252b571..6c2dadc 100644--- a/apps/app/server/api/sources/[id]/files.put.ts+++ b/apps/app/server/api/sources/[id]/files.put.ts@@ -64,7 +64,7 @@ export default defineEventHandler(async (event) => {const pathname = `sources/${id}/${filename}`const contentType = field.type || 'text/plain'- await blob.put(pathname, field.data, { contentType })+ await blob.put(pathname, new Blob([field.data], { type: contentType }), { contentType })results.push({ filename, pathname, size: field.data.length })}