Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
a4a53692
"torchvision/csrc/ops/cpu/roi_align_kernel.cpp" did not exist on "2e1e0b63145a54746d3b47c5267cc2521f113a9f"
Commit
a4a53692
authored
Nov 06, 2025
by
Daniel Alejandro Coll Tejeda
Browse files
refactor: remove GIF support from image validation tests and logging
parent
bddfa210
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
16 deletions
+0
-16
app/ui/app/src/utils/fileValidation.test.ts
app/ui/app/src/utils/fileValidation.test.ts
+0
-9
app/ui/app/src/utils/fileValidation.ts
app/ui/app/src/utils/fileValidation.ts
+0
-7
No files found.
app/ui/app/src/utils/fileValidation.test.ts
View file @
a4a53692
...
@@ -7,7 +7,6 @@ describe("fileValidation", () => {
...
@@ -7,7 +7,6 @@ describe("fileValidation", () => {
expect
(
IMAGE_EXTENSIONS
).
toContain
(
"
png
"
);
expect
(
IMAGE_EXTENSIONS
).
toContain
(
"
png
"
);
expect
(
IMAGE_EXTENSIONS
).
toContain
(
"
jpg
"
);
expect
(
IMAGE_EXTENSIONS
).
toContain
(
"
jpg
"
);
expect
(
IMAGE_EXTENSIONS
).
toContain
(
"
jpeg
"
);
expect
(
IMAGE_EXTENSIONS
).
toContain
(
"
jpeg
"
);
expect
(
IMAGE_EXTENSIONS
).
toContain
(
"
gif
"
);
expect
(
IMAGE_EXTENSIONS
).
toContain
(
"
webp
"
);
expect
(
IMAGE_EXTENSIONS
).
toContain
(
"
webp
"
);
});
});
});
});
...
@@ -30,14 +29,6 @@ describe("fileValidation", () => {
...
@@ -30,14 +29,6 @@ describe("fileValidation", () => {
expect
(
result
.
valid
).
toBe
(
true
);
expect
(
result
.
valid
).
toBe
(
true
);
});
});
it
(
"
should accept GIF images when vision capability is enabled
"
,
()
=>
{
const
file
=
createMockFile
(
"
test.gif
"
,
1024
,
"
image/gif
"
);
const
result
=
validateFile
(
file
,
{
hasVisionCapability
:
true
,
});
expect
(
result
.
valid
).
toBe
(
true
);
});
it
(
"
should reject WebP images when vision capability is disabled
"
,
()
=>
{
it
(
"
should reject WebP images when vision capability is disabled
"
,
()
=>
{
const
file
=
createMockFile
(
"
test.webp
"
,
1024
,
"
image/webp
"
);
const
file
=
createMockFile
(
"
test.webp
"
,
1024
,
"
image/webp
"
);
const
result
=
validateFile
(
file
,
{
const
result
=
validateFile
(
file
,
{
...
...
app/ui/app/src/utils/fileValidation.ts
View file @
a4a53692
...
@@ -84,13 +84,6 @@ export function validateFile(
...
@@ -84,13 +84,6 @@ export function validateFile(
}
}
if
(
IMAGE_EXTENSIONS
.
includes
(
fileExtension
)
&&
!
hasVisionCapability
)
{
if
(
IMAGE_EXTENSIONS
.
includes
(
fileExtension
)
&&
!
hasVisionCapability
)
{
console
.
log
(
"
Image validation failed:
"
,
{
fileExtension
,
fileName
:
file
.
name
,
hasVisionCapability
,
IMAGE_EXTENSIONS
,
isImageExtension
:
IMAGE_EXTENSIONS
.
includes
(
fileExtension
),
});
return
{
valid
:
false
,
error
:
"
This model does not support images
"
};
return
{
valid
:
false
,
error
:
"
This model does not support images
"
};
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment