(filename: string)
| 58 | } |
| 59 | |
| 60 | function getExtension(filename: string): string { |
| 61 | const dot = filename.lastIndexOf('.') |
| 62 | return dot >= 0 ? filename.slice(dot + 1).toLowerCase() : '' |
| 63 | } |
| 64 | |
| 65 | function detectImageMime(buf: Buffer, claimed: string): string { |
| 66 | if (buf.length < 12) return claimed |