Skip to content

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.

fix: support uppercase file extensions

Brad Barbina206816b5c81
diff --git a/apps/carbon/app/routes/file+/preview+/$bucket.$.tsx b/apps/carbon/app/routes/file+/preview+/$bucket.$.tsx
index 4f85b8b067..6a5f880485 100644
--- a/apps/carbon/app/routes/file+/preview+/$bucket.$.tsx
+++ b/apps/carbon/app/routes/file+/preview+/$bucket.$.tsx
@@ -31,7 +31,7 @@ export let loader = async ({ request, params }: LoaderFunctionArgs) => {
if (!bucket) throw new Error("Bucket not found");
if (!path) throw new Error("Path not found");
- const fileType = path.split(".").pop();
+ const fileType = path.split(".").pop()?.toLowerCase();
if (!fileType || !(fileType in supportedFileTypes))
throw new Error("File type not supported");
const contentType = supportedFileTypes[fileType];