mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 18:59:33 +01: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:
1 parent
1fa88cd187
commit
bb1d16e230
5 files changed
+151
-2
No files matched your search
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