Merge pull request #4481 from BrokenEagle/fix-iqdb-image-url

Adds suport for using the image_url parameter with IQDB
This commit is contained in:
evazion
2020-05-25 02:20:55 -05:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@@ -25,7 +25,10 @@ class IqdbProxy
file = download(params[:url], :preview_url)
results = query(file: file, limit: limit)
elsif params[:image_url].present?
file = download(params[:image_url], :image_url)
file = download(params[:image_url], :url)
results = query(file: file, limit: limit)
elsif params[:file_url].present?
file = download(params[:file_url], :file_url)
results = query(file: file, limit: limit)
elsif params[:post_id].present?
url = Post.find(params[:post_id]).preview_file_url