mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Merge pull request #337 from mdashlw/reverse-fix
Some reverse search fixes
This commit is contained in:
commit
08d74b9be6
2 changed files with 13 additions and 3 deletions
|
@ -37,6 +37,16 @@ defmodule Philomena.DuplicateReports.SearchQuery do
|
|||
:image_aspect_ratio,
|
||||
:uploaded_image
|
||||
])
|
||||
|> validate_required([
|
||||
:image_width,
|
||||
:image_height,
|
||||
:image_format,
|
||||
:image_duration,
|
||||
:image_mime_type,
|
||||
:image_is_animated,
|
||||
:image_aspect_ratio,
|
||||
:uploaded_image
|
||||
])
|
||||
|> validate_number(:image_width, greater_than: 0)
|
||||
|> validate_number(:image_height, greater_than: 0)
|
||||
|> validate_inclusion(
|
||||
|
|
|
@ -13,7 +13,7 @@ h1 Reverse Search
|
|||
p Upload a file from your computer, or provide a link to the page containing the image and click Fetch.
|
||||
.field
|
||||
= file_input f, :image, class: "input js-scraper"
|
||||
= error_tag f, :image
|
||||
= error_tag f, :uploaded_image
|
||||
= error_tag f, :image_width
|
||||
= error_tag f, :image_height
|
||||
= error_tag f, :image_mime_type
|
||||
|
|
Loading…
Reference in a new issue