Merge remote-tracking branch 'origin/main'

This commit is contained in:
Nevo David 2025-12-26 11:21:53 +07:00
commit 13137e803d
2 changed files with 3 additions and 2 deletions

View File

@ -88,7 +88,7 @@ export function useUppyUploader(props: {
// Expand generic types to specific ones
const expandedTypes = allowedTypes.flatMap((type) => {
if (type === 'image/*') {
return ['image/png', 'image/jpeg', 'image/jpg', 'image/gif'];
return ['image/png', 'image/jpeg', 'image/jpg', 'image/gif', 'image/webp'];
}
if (type === 'video/*') {
return ['video/mp4', 'video/mpeg'];

View File

@ -12,6 +12,7 @@ export class ValidUrlExtension implements ValidatorConstraintInterface {
!!text?.split?.('?')?.[0].endsWith('.jpg') ||
!!text?.split?.('?')?.[0].endsWith('.jpeg') ||
!!text?.split?.('?')?.[0].endsWith('.gif') ||
!!text?.split?.('?')?.[0].endsWith('.webp') ||
!!text?.split?.('?')?.[0].endsWith('.mp4')
);
}
@ -19,7 +20,7 @@ export class ValidUrlExtension implements ValidatorConstraintInterface {
defaultMessage(args: ValidationArguments) {
// here you can provide default error message if validation failed
return (
'File must have a valid extension: .png, .jpg, .jpeg, .gif, or .mp4'
'File must have a valid extension: .png, .jpg, .jpeg, .gif, .webp, or .mp4'
);
}
}