harden media

This commit is contained in:
2025-12-31 15:39:28 +01:00
parent 92226800df
commit 8260bf7baf
413 changed files with 8361 additions and 1544 deletions

View File

@@ -27,8 +27,22 @@ export interface MediaStoragePort {
uploadMedia(buffer: Buffer, options: UploadOptions): Promise<UploadResult>;
/**
* Delete a media file by URL
* @param url Media URL to delete
* Delete a media file by storage key
* @param storageKey Storage key to delete
*/
deleteMedia(url: string): Promise<void>;
deleteMedia(storageKey: string): Promise<void>;
/**
* Get file bytes as Buffer
* @param storageKey Storage key
* @returns Buffer or null if not found
*/
getBytes?(storageKey: string): Promise<Buffer | null>;
/**
* Get file metadata
* @param storageKey Storage key
* @returns File metadata or null if not found
*/
getMetadata?(storageKey: string): Promise<{ size: number; contentType: string } | null>;
}