fixed db scripts

This commit is contained in:
blaisadmin
2026-05-02 10:24:58 -04:00
parent 1bb3002baf
commit 22f344a998
8 changed files with 409 additions and 14 deletions
+16
View File
@@ -65,3 +65,19 @@ export const buildBirdPhotoObjectKey = ({
return `${prefix}/workspace-${workspaceId}/${birdId}/${timestamp}.${safeExtension}`;
};
export const getImageExtensionFromContentType = (contentType: string) => {
switch (contentType.toLowerCase()) {
case 'image/jpeg':
case 'image/jpg':
return 'jpg';
case 'image/png':
return 'png';
case 'image/webp':
return 'webp';
case 'image/gif':
return 'gif';
default:
return 'bin';
}
};