mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-05 23:19:43 +02:00
feat(image): convert HEIC paste uploads to JPEG
When a browser pastes an HEIC file without normalising it first, the paste-image route now converts it to JPEG server-side via heic-convert before writing to .claude-images/. Magic-byte validation confirms the output is valid JPEG. Adds type declarations for the heic-convert package. Co-authored-by: Saqeb Akhter <saqeb.akhter@gmail.com>
This commit is contained in:
co-authored by
Saqeb Akhter
parent
1fa88cd187
commit
bb1d16e230
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
declare module 'heic-convert' {
|
||||
export interface ConvertOptions {
|
||||
buffer: Buffer;
|
||||
format: 'JPEG' | 'PNG';
|
||||
quality?: number;
|
||||
}
|
||||
|
||||
export default function convert(options: ConvertOptions): Promise<Buffer | Uint8Array | ArrayBuffer>;
|
||||
}
|
||||
Reference in New Issue
Block a user