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