* Get the file path for an image by ID.
(imageId: number, mediaType: string)
| 31 | * Get the file path for an image by ID. |
| 32 | */ |
| 33 | function getImagePath(imageId: number, mediaType: string): string { |
| 34 | const extension = mediaType.split('/')[1] || 'png' |
| 35 | return join(getImageStoreDir(), `${imageId}.${extension}`) |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Cache the image path immediately (fast, no file I/O). |
no test coverage detected