fix(msteams): detect windows local paths for uploads

This commit is contained in:
Peter Steinberger
2026-02-13 15:07:27 +00:00
parent c60780ba20
commit a5faea614b
2 changed files with 24 additions and 1 deletions

View File

@@ -145,6 +145,15 @@ describe("msteams media-helpers", () => {
expect(isLocalPath("~/Downloads/image.png")).toBe(true);
});
it("returns true for Windows absolute drive paths", () => {
expect(isLocalPath("C:\\Users\\test\\image.png")).toBe(true);
expect(isLocalPath("D:/data/photo.jpg")).toBe(true);
});
it("returns true for Windows UNC paths", () => {
expect(isLocalPath("\\\\server\\share\\image.png")).toBe(true);
});
it("returns false for http URLs", () => {
expect(isLocalPath("http://example.com/image.png")).toBe(false);
expect(isLocalPath("https://example.com/image.png")).toBe(false);