Skip to content

Commit 709000c

Browse files
committed
fix(everything): correct blob resource mimeType
The blobResource() factory in src/everything/resources/templates.ts returned mimeType "text/plain" for what is, by definition, a base64 blob. The registered Dynamic Blob Resource template at the bottom of the same file already declared "application/octet-stream", so the factory contradicted its own template metadata. Downstream, get-resource-links.ts:74-79 branches on this mimeType to label resources, so every blob resource_link was being described as "plaintext resource". Update the factory to return "application/octet-stream" and the matching test assertion. No behaviour change beyond the mimeType itself and the now-correct downstream label.
1 parent ce3b44e commit 709000c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/everything/__tests__/resources.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('Resource Templates', () => {
8383
const resource = blobResource(uri, 1);
8484

8585
expect(resource.uri).toBe(uri.toString());
86-
expect(resource.mimeType).toBe('text/plain');
86+
expect(resource.mimeType).toBe('application/octet-stream');
8787
expect(resource.blob).toBeDefined();
8888
});
8989

src/everything/resources/templates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const blobResource = (uri: URL, resourceId: number) => {
105105
).toString("base64");
106106
return {
107107
uri: uri.toString(),
108-
mimeType: "text/plain",
108+
mimeType: "application/octet-stream",
109109
blob: resourceText,
110110
};
111111
};

0 commit comments

Comments
 (0)