Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Commit 7309ba2

Browse files
committed
Windows 特有の /\ になってるやつ
1 parent 147a627 commit 7309ba2

File tree

1 file changed

+4
-1
lines changed
  • workspaces/server/src/routes/image

1 file changed

+4
-1
lines changed

workspaces/server/src/routes/image/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ app.get(
9090
throw new HTTPException(501, { message: `Image format: ${resImgFormat} is not supported.` });
9191
}
9292

93-
const origFileGlob = [path.resolve(IMAGES_PATH, `${reqImgId}`), path.resolve(IMAGES_PATH, `${reqImgId}.*`)];
93+
const origFileGlob = [
94+
path.resolve(IMAGES_PATH, `${reqImgId}`).replaceAll('\\', '/'),
95+
path.resolve(IMAGES_PATH, `${reqImgId}.*`).replaceAll('\\', '/'),
96+
];
9497
const [origFilePath] = await globby(origFileGlob, { absolute: true, onlyFiles: true });
9598
if (origFilePath == null) {
9699
throw new HTTPException(404, { message: 'Not found.' });

0 commit comments

Comments
 (0)