server: fix issue where no video files could be uploaded
This commit is contained in:
parent
3cabe790a7
commit
fa4997fbb9
|
@ -44,7 +44,7 @@ def _preprocess_image(content: bytes) -> NpMatrix:
|
||||||
try:
|
try:
|
||||||
img = Image.open(BytesIO(content))
|
img = Image.open(BytesIO(content))
|
||||||
return np.asarray(img.convert("L"), dtype=np.uint8)
|
return np.asarray(img.convert("L"), dtype=np.uint8)
|
||||||
except IOError:
|
except (IOError, ValueError):
|
||||||
raise errors.ProcessingError(
|
raise errors.ProcessingError(
|
||||||
"Unable to generate a signature hash " "for this image."
|
"Unable to generate a signature hash " "for this image."
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue