Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
one line improvement
Gaurav Bhatt8cb95f91afec
diff --git a/apps/erp/app/modules/shared/shared.service.ts b/apps/erp/app/modules/shared/shared.service.tsindex f16f040402..0ec7f8b71c 100644--- a/apps/erp/app/modules/shared/shared.service.ts+++ b/apps/erp/app/modules/shared/shared.service.ts@@ -48,17 +48,7 @@ export async function getBase64ImageFromSupabase(path: string) {function arrayBufferToBase64(buffer: ArrayBuffer): string {- // Use chunking for large objects to prevent stack overflow- const bytes = new Uint8Array(buffer);- const chunkSize = 8192;- let binary = "";-- for (let i = 0; i < bytes.length; i += chunkSize) {- const chunk = bytes.slice(i, i + chunkSize);- binary += String.fromCharCode(...chunk);- }-- return btoa(binary);+ return Buffer.from(buffer).toString("base64");}const { data, error } = await client.storage.from("private").download(path);