archetecture security fix

This commit is contained in:
root
2026-06-11 03:22:12 -04:00
parent 6def9993da
commit 9483750161
3126 changed files with 177194 additions and 37211 deletions
+21
View File
@@ -0,0 +1,21 @@
import multer from 'multer';
/**
* Shared multer instance used by all upload endpoints.
* Files are kept in memory so services receive a Buffer — no temp-file cleanup needed.
*/
export declare const imageUpload: multer.Multer;
type DetectedFile = {
mime: string;
ext: string;
};
export declare function detectImageType(buffer: Buffer): DetectedFile | null;
/**
* Asserts that a file was provided and is an image by content, not by client claims.
*/
export declare function assertImageFile(file: Express.Multer.File | undefined, fieldLabel?: string): asserts file is Express.Multer.File;
/**
* Asserts that at least one file was provided and all files are image content.
*/
export declare function assertImageFiles(files: Express.Multer.File[], fieldLabel?: string): void;
export {};
//# sourceMappingURL=index.d.ts.map