mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 18:36:22 +00:00
no permitir subir imágenes que no son para web
This commit is contained in:
parent
fdbe724f7c
commit
f3df550494
1 changed files with 1 additions and 3 deletions
|
@ -13,8 +13,6 @@ class MetadataImage < MetadataFile
|
||||||
|
|
||||||
# Determina si es una imagen
|
# Determina si es una imagen
|
||||||
def image?
|
def image?
|
||||||
return true unless file
|
static_file&.blob&.send(:web_image?)
|
||||||
|
|
||||||
filemagic.file(file).starts_with? 'image/'
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue